[Bug 1869364] Re: glibc pwd/test-getpw test failures in autopkgtest
Michael Hudson-Doyle
1869364 at bugs.launchpad.net
Wed Jun 24 10:14:43 UTC 2020
Yes, and it doesn't matter whether you use the interpreter from the
build directory or the default one (the binary has PF_INTERP set to /lib
/ld-linux-aarch64.so.1 but the testsuite invokes it with the one from
the build tree).
Some gdb time later, it transpires that this is systemd's fault :) (at
least partially)
I'm a bit hazy on NSS in general, but valid uids present in /etc/passwd
are (I assume) found by the "compat" nss module. Ones that are not found
there are sent off to the libnss-systemd.so.
In there, _nss_systemd_getpwuid_r calls userdb_getpwuid which calls
userdb_nss_compat_is_enabled which calls userdb_thread_sockaddr which
calls getauxval(AT_RANDOM) which for some reason in this situation
_fails_. userdb_thread_sockaddr then returns -EIO which leads to
userdb_getpwuid setting errnop to EIO and returning NSS_STATUS_UNAVAIL
which leads to _nss_systemd_getpwuid_r setting its errnop to EIO and
that's what the test program sees as errno.
This leads me to this experiment:
ubuntu at juju-b11c42-ubuntu-24:~$ cat getauxval.c
#include <sys/auxv.h>
#include <stdio.h>
int main(int argc, char** argv) {
printf("%lu\n", getauxval(AT_RANDOM));
}
ubuntu at juju-b11c42-ubuntu-24:~$ gcc -o getauxval getauxval.c
ubuntu at juju-b11c42-ubuntu-24:~$ ./getauxval
281474825715272
ubuntu at juju-b11c42-ubuntu-24:~$ /lib/ld-linux-aarch64.so.1 ./getauxval
0
which seems like a bug (it doesn't happen on amd64 or s390x).
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1869364
Title:
glibc pwd/test-getpw test failures in autopkgtest
Status in glibc package in Ubuntu:
Triaged
Status in glibc source package in Groovy:
Triaged
Bug description:
I started seeing this in the testing for 5.4.0-20. Only happening on
arm64/armhf.
----------
FAIL: pwd/tst-getpw
original exit status 223
PASS: NULL buffer returns -1 and sets errno to EINVAL.
PASS: Read a password line given a uid.
FAIL: Did not find even one invalid uid.
----------
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/arm64/g/glibc/20200326_165114_2fcf9@/log.gz
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/armhf/g/glibc/20200326_173356_3378d@/log.gz
I've unsuccessfully tried to reproduce this on an arm64 host (by
running this test case standalone, not the full test suite), so
possibly there's something about the autopkgtest environment. This
also happens with the 5.4.0-18 from focal-release, so it does not
appear to be a regression in the kernel.
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac
/autopkgtest-focal/focal/arm64/g/glibc/20200326_224201_5fd33@/log.gz
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1869364/+subscriptions
More information about the foundations-bugs
mailing list