E: Method gave invalid 400 URI Failure message: Could not switch saved set-user-ID
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (112)
E: Method gave invalid 400 URI Failure message: Could not switch saved set-user-ID
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (112)
This seems to be the problem and related to apt. For some reason, apt is not able to
switch its user id to "_apt". I'm not sure yet why.
[pid 102267] setgroups(1, [0] <unfinished ...>
[pid 102267] <... setgroups resumed>) = 0
...
[pid 102267] setresgid(65534, 65534, 65534) = 0
[pid 102267] setresuid(42, 42, 42) = 0
[pid 102267] getgid() = 65534
[pid 102267] getegid() = 65534
[pid 102267] getuid() = 42
[pid 102267] geteuid() = 42
[pid 102267] getresuid([42], [42], [42]) = 0
[pid 102267] write(1, "400 URI Failure\nMessage: Could n"..., 76) = 76
42 and 65534 are in fact the uid and gid of the _apt user, according to pbuilder/sid-sparc64.cow/etc/passwd . Maybe it expects something else instead? But why it call setresuid(_apt, _apt, _apt) then...
Comparing these two values:
42 0x2A
2752512 0x2A0000
uid_t is defined as:
/usr/include/sparc64-linux-gnu/sys/types.h:typedef __uid_t uid_t; /usr/include/sparc64-linux-gnu/bits/types.h:__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
/usr/include/sparc64-linux-gnu/bits/typesizes.h:#define __UID_T_TYPE __U32_TYPE
/usr/include/sparc64-linux-gnu/bits/types.h:#define __U32_TYPE unsigned int
struct passwd uses:
__uid_t pw_uid; /* User ID. */
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960
It looks like another case of values not properly passed between the
host and guest
in a qemu-user setup. Another very prominent case are file handles, see
[1].
Adrian
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960
Where should I report this bug, then?
On the glibc Bugzilla, or on https://gitlab.com/qemu-project/qemu/-/issues ?
Or is this a kernel bug?
I suggest reporting this as a QEMU bug first and they'll tell you whether you're
at the right address or need to forward this to the kernel or glibc people.
Done: https://gitlab.com/qemu-project/qemu/-/issues/1394
I'll create an appropriate Debian bug when I have more information (i.e. which package needs to be fixed).
I hacked apt (see below) to get around the issue and started what I was originally trying
to do: https://buildd.debian.org/status/logs.php?pkg=nss&ver=2%3A3.85-1&arch=sparc64
Unfortunately, the "uname: Bad address" doesn't appear in qemu. Looks like I'll have to
debug this on the actual hardware after all.
Is this a known issue?
While trying to trace the libnss issue, I also encountered a crash in g++, which I haven't been able to debug yet.
I suggest reporting this as a QEMU bug first and they'll tell you
whether you're
at the right address or need to forward this to the kernel or glibc people.
As I mentioned earlier in this thread, you can just configure apt to run
as root to avoid
this problem.
Unfortunately, the "uname: Bad address" doesn't appear in qemu. Looks
like I'll have to
debug this on the actual hardware after all.
Is this a known issue?
Not that I know of. However, I would just bisect the issue in nss.
FWIW, I know that there is going to be a new SPARC machine in the GCC
compile farm based
on a SPARC T4-2 that should become available soonish.
Since gcc102 is available right now, I tested the libnss build on that machine. libnspr4-dev
isn't installed, but the build got sufficiently far to compare output with the Debian build
machines.
Unfortunately, the uname issue does not occur there, which leads me to believe something is
different between gcc102 and the Debian build hosts[1].
gcc102 has coreutils 9.1-1, libc6 2.36-4 and uname reports:
Linux gcc102.fsffrance.org 6.1.0+ #1 SMP Tue Dec 13 08:35:29 CST 2022 sparc64 GNU/Linux
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (3 / 13) |
Uptime: | 12:48:40 |
Calls: | 6,667 |
Calls today: | 1 |
Files: | 12,214 |
Messages: | 5,336,511 |