tests failing on x86_64-linux (due to test-container?)

Martin Sebor msebor@gmail.com
Wed Apr 28 23:42:46 GMT 2021


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


More information about the Libc-alpha mailing list