unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Martin Sebor via Libc-alpha <libc-alpha@sourceware.org>
To: DJ Delorie <dj@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: tests failing on x86_64-linux (due to test-container?)
Date: Wed, 28 Apr 2021 17:42:46 -0600	[thread overview]
Message-ID: <b6e75954-9b90-65c5-2761-bf8103ca2d29@gmail.com> (raw)
In-Reply-To: <xny2d23t3b.fsf@rhel8.vm>

On 4/28/21 5:08 PM, DJ Delorie wrote:
> 
> Martin Sebor <msebor@gmail.com> writes:
>> /build/glibc/nss/tst-nss-test3: error while loading shared libraries:
>> /build/glibc/nss/tst-nss-test3: cannot open shared object file: No such
>> file or directory
>>
>> Not sure what .so it's looking for though.
> 
> That would be "/build/glibc/nss/tst-nss-test3" ;-)

Aaah.  tst-nss-test3 is failing to open itself.  Poor thing must
be lost. ;)

> 
> (which should be bind-mounted inside your test chroot, which would be
> /build/glibc/testroot.root/build/glibc/nss/tst-nss-test3)

/build/glibc/testroot.root/build/glibc/ is empty.

> 
> You can strace the test, if you're root, with "strace -f -o /tmp/foo
> make test ..."

With this as root I get:

error: test-container.c:235: can't mount /ssd/src/glibc onto 
/build/glibc/testroot.root/ssd/src/glibc

The strace log before the error shows this (I don't see anything
suspicious before that):

31182 getuid()                          = 0
31182 getgid()                          = 0
31182 openat(AT_FDCWD, 
"/ssd/build/glibc/elf/ld-linux-x86-64.so.2.root/ld-linux-x86-64.so.2.script", 
O_RDONLY) = -1 ENOENT (No such file or directory)
31182 openat(AT_FDCWD, 
"/ssd/build/glibc/elf/ld-linux-x86-64.so.2.script", O_RDONLY) = -1 
ENOENT (No such file or directory)
31182 unshare(CLONE_NEWNS|CLONE_NEWUSER|CLONE_NEWPID) = 0
31182 mount("none", "/", NULL, MS_REC|MS_PRIVATE, NULL) = 0
31182 mount("/ssd/src/glibc", 
"/build/glibc/testroot.root/ssd/src/glibc", 0x40927f, MS_BIND, NULL) = 
-1 EACCES (Permission denied)
31182 write(1, "error: test-container.c:235: ", 29) = 29
31182 write(1, "can't mount /ssd/src/glibc onto "..., 73) = 73
31182 write(1, "\n", 1)                 = 1
31182 exit_group(1)                     = ?
31182 +++ exited with 1 +++

> 
> You can also run "capsh --print" to make sure you have all the
> capabilities you expect.  IIRC cap_sys_admin and cap_sys_chroot are key,
> along with cap_mknod, and maybe cap_setgid and cap_setuid.

I have all those.

> 
> Also, selinux might be interfering.
> 

That doesn't sound encouraging.  Anything I should look at/for?
I looked at recent entries in journalctl from around the time
I ran strace but couldn't see anything interesting there either
(of course, I might not know if I saw it).

Martin

  reply	other threads:[~2021-04-28 23:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 18:17 tests failing on x86_64-linux Martin Sebor via Libc-alpha
2020-12-09 18:28 ` H.J. Lu via Libc-alpha
2020-12-09 21:17   ` Martin Sebor via Libc-alpha
2020-12-09 21:44     ` H.J. Lu via Libc-alpha
2020-12-09 22:31       ` H.J. Lu via Libc-alpha
2020-12-10  2:50         ` H.J. Lu via Libc-alpha
2020-12-15  0:55           ` Martin Sebor via Libc-alpha
2021-04-28 20:07             ` tests failing on x86_64-linux (due to test-container?) Martin Sebor via Libc-alpha
2021-04-28 20:37               ` DJ Delorie via Libc-alpha
2021-04-28 21:50                 ` Martin Sebor via Libc-alpha
2021-04-28 23:08                   ` DJ Delorie via Libc-alpha
2021-04-28 23:42                     ` Martin Sebor via Libc-alpha [this message]
2021-04-28 23:54                       ` DJ Delorie via Libc-alpha
2021-05-13 21:29                         ` Martin Sebor via Libc-alpha
2022-01-12 22:04                           ` Martin Sebor via Libc-alpha
2022-01-12 22:13                             ` H.J. Lu via Libc-alpha
2022-01-12 23:24                               ` Martin Sebor via Libc-alpha
2022-01-14 23:51                                 ` Martin Sebor via Libc-alpha
2022-01-17 18:04                                   ` Adhemerval Zanella via Libc-alpha
2022-01-17 19:09                                     ` Joseph Myers
2022-01-20 22:23                                     ` Martin Sebor via Libc-alpha
2020-12-16 10:21     ` tests failing on x86_64-linux Florian Weimer via Libc-alpha
2020-12-09 19:03 ` Florian Weimer via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6e75954-9b90-65c5-2761-bf8103ca2d29@gmail.com \
    --to=libc-alpha@sourceware.org \
    --cc=dj@redhat.com \
    --cc=msebor@gmail.com \
    /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).