From: John David Anglin <dave.anglin@bell.net>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org, Helge Deller <deller@gmx.de>
Subject: Re: [committed] hppa: undef __ASSUME_SET_ROBUST_LIST
Date: Wed, 21 Sep 2022 09:52:56 -0400 [thread overview]
Message-ID: <c320320d-716e-b708-319b-1d03f66f79ce@bell.net> (raw)
In-Reply-To: <mvm1qs5qim6.fsf@suse.de>
On 2022-09-21 3:41 a.m., Andreas Schwab wrote:
> On Sep 20 2022, John David Anglin wrote:
>
>> QEMU does not support support set_robust_list. Thus, we need
>> to enable detection of set_robust_list system call.
> This is actually a generic issue. What are the symptoms?
This what Helge found building Debian glibc 2.23 under qemu:
glibc is still building but here are some more failures:
glibc-2.34/build-tree/hppa-libc/nptl/tst-align-clone.test-result:FAIL: nptl/tst-align-clone
glibc-2.34/build-tree/hppa-libc/nptl/tst-cancel24-static.test-result:FAIL: nptl/tst-cancel24-static
glibc-2.34/build-tree/hppa-libc/nptl/tst-cancel24.test-result:FAIL: nptl/tst-cancel24
glibc-2.34/build-tree/hppa-libc/nptl/tst-cancelx17.test-result:FAIL: nptl/tst-cancelx17
glibc-2.34/build-tree/hppa-libc/nptl/tst-cleanupx4.test-result:XFAIL: nptl/tst-cleanupx4
glibc-2.34/build-tree/hppa-libc/nptl/tst-execstack.test-result:FAIL: nptl/tst-execstack
glibc-2.34/build-tree/hppa-libc/nptl/tst-getpid1.test-result:FAIL: nptl/tst-getpid1
glibc-2.34/build-tree/hppa-libc/nptl/tst-mutexpi10.test-result:FAIL: nptl/tst-mutexpi10
glibc-2.34/build-tree/hppa-libc/nptl/tst-pthread-attr-affinity-fail.test-result:FAIL: nptl/tst-pthread-attr-affinity-fail
glibc-2.34/build-tree/hppa-libc/nptl/tst-pthread-gdb-attach-static.test-result:FAIL: nptl/tst-pthread-gdb-attach-static
glibc-2.34/build-tree/hppa-libc/nptl/tst-pthread-gdb-attach.test-result:FAIL: nptl/tst-pthread-gdb-attach
glibc-2.34/build-tree/hppa-libc/nptl/tst-pthread-timedlock-lockloop.test-result:FAIL: nptl/tst-pthread-timedlock-lockloop
glibc-2.34/build-tree/hppa-libc/nptl/tst-robust-fork.test-result:FAIL: nptl/tst-robust-fork
tst-cancel24 triggered my interest, so I checked what's doing:
#> QEMU_LOG=strace ./glibc-2.34/build-tree/hppa-libc/nptl/tst-cancel24
...
2080424 set_robust_list(-105721680,12,0,-105720464,-100671382,1) = -1 errno=251 (Function not implemented)
...
This syscall isn't implemented in qemu, and probably won't either.
Here is the comment from qemu sources:
case TARGET_NR_set_robust_list:
case TARGET_NR_get_robust_list:
/* The ABI for supporting robust futexes has userspace pass
* the kernel a pointer to a linked list which is updated by
* userspace after the syscall; the list is walked by the kernel
* when the thread exits. Since the linked list in QEMU guest
* memory isn't a valid linked list for the host and we have
* no way to reliably intercept the thread-death event, we can't
* support these. Silently return ENOSYS so that guest userspace
* falls back to a non-robust futex implementation (which should
* be OK except in the corner case of the guest crashing while
* holding a mutex that is shared with another process via
* shared memory).
*/
return -TARGET_ENOSYS;
This basically means we never will be able to succeed this test
when building glibc on qemu-linux-user - unless we disable such tests,
which I think isn't a good idea.
Dave
--
John David Anglin dave.anglin@bell.net
next prev parent reply other threads:[~2022-09-21 13:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-20 20:20 John David Anglin
2022-09-21 7:41 ` Andreas Schwab
2022-09-21 13:52 ` John David Anglin [this message]
2022-09-21 14:05 ` Andreas Schwab
2022-09-21 14:11 ` John David Anglin
2022-09-21 14:23 ` Andreas Schwab
2022-09-21 12:16 ` Adhemerval Zanella Netto
2022-09-21 12:49 ` Florian Weimer
2022-09-21 12:59 ` Andreas Schwab
2022-09-21 13:56 ` Adhemerval Zanella Netto
2022-09-22 12:18 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c320320d-716e-b708-319b-1d03f66f79ce@bell.net \
--to=dave.anglin@bell.net \
--cc=deller@gmx.de \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).