Bug 30603 - Various test failures with EPERM in systemd-nspawn container
Summary: Various test failures with EPERM in systemd-nspawn container
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: build (show other bugs)
Version: 2.38
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-01 12:46 UTC by Sam James
Modified: 2023-08-01 15:12 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
build.log.xz (518.55 KB, application/x-xz)
2023-07-01 12:46 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James 2023-07-01 12:46:01 UTC
Created attachment 14950 [details]
build.log.xz

I mentioned this to Carlos a few months ago but only now getting to file a bug, sorry! When we discussed it, the conclusion was these tests should really be autoskipped.

One example of many is tst-ntp_gettimex:
```
/var/tmp/portage/sys-libs/glibc-2.37-r3/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/misc/tst-ntp_gettimex.out
```
error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL failed: Operation not permitted

error: 1 test failures
```

Full failure list (a handful of these are unrelated, like the math ones, but I figure that's obvious);
```
 # grep FAIL /var/tmp/portage/sys-libs/glibc-2.37-r3/temp/build.log
FAIL: debug/tst-ssp-1
FAIL: elf/tst-execstack
FAIL: elf/tst-execstack-needed
FAIL: elf/tst-execstack-prog
FAIL: math/test-double-j0
FAIL: math/test-double-j1
FAIL: math/test-double-log
FAIL: math/test-float32x-j0
FAIL: math/test-float32x-j1
FAIL: math/test-float32x-log
FAIL: math/test-float64-j0
FAIL: math/test-float64-j1
FAIL: math/test-float64-log
FAIL: math/test-ldouble-j0
FAIL: math/test-ldouble-j1
FAIL: math/test-ldouble-log
FAIL: misc/test-errno-linux
FAIL: misc/tst-mlock2
FAIL: misc/tst-ntp_gettime
FAIL: misc/tst-ntp_gettime-time64
FAIL: misc/tst-ntp_gettimex
FAIL: misc/tst-ntp_gettimex-time64
FAIL: misc/tst-pkey
FAIL: misc/tst-process_mrelease
FAIL: nptl/tst-execstack
FAIL: time/tst-adjtime
FAIL: time/tst-adjtime-time64
FAIL: time/tst-clock2
FAIL: time/tst-clock2-time64
     29 FAIL
     21 XFAIL
```

I've seen the same sort of thing on arm64 and possibly amd64 (but would need to check).
Comment 1 Carlos O'Donell 2023-07-03 02:37:30 UTC
(In reply to Sam James from comment #0)
> One example of many is tst-ntp_gettimex:
> ```
> /var/tmp/portage/sys-libs/glibc-2.37-r3/work/build-hppa-hppa2.0-unknown-
> linux-gnu-nptl/misc/tst-ntp_gettimex.out
> ```
> error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL
> failed: Operation not permitted
> 
> error: 1 test failures
> ```

Are you able to reproduce this under strace and determine the exact syscall that is failing? Sometimes it's surprising what's failing.
Comment 2 Andreas K. Huettel 2023-07-22 19:15:25 UTC
aarch64 (jiji)

* baremetal

no failures

* in systemd-nspawn:

FAIL: misc/test-errno-linux
FAIL: misc/tst-mlock2
FAIL: misc/tst-ntp_gettime
FAIL: misc/tst-ntp_gettimex
FAIL: misc/tst-pkey
FAIL: misc/tst-process_mrelease
FAIL: time/tst-adjtime

Details from jiji:

FAIL: misc/test-errno-linux
> FAIL: mlock: errno is: 1 (Operation not permitted) expected one of LIST_FORWARD ({ 22, 12 })

FAIL: misc/tst-mlock2
> error: ../sysdeps/unix/sysv/linux/tst-mlock2.c:40: mlock: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-ntp_gettime
> error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL failed: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-ntp_gettimex
> error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL failed: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-pkey
> error: ../sysdeps/unix/sysv/linux/tst-pkey.c:206: pkey_alloc: Operation not permitted
> error: 1 test failures

FAIL: misc/tst-process_mrelease
> ../sysdeps/unix/sysv/linux/tst-process_mrelease.c:54: numeric comparison failure
>    left: 1 (0x1); from: errno
>   right: 9 (0x9); from: EBADF
> ../sysdeps/unix/sysv/linux/tst-process_mrelease.c:69: numeric comparison failure
>    left: 1 (0x1); from: errno
>   right: 22 (0x16); from: EINVAL
> error: 2 test failures

FAIL: time/tst-adjtime
> error: tst-adjtime.c:38: adjtime (NULL, ...) failed: Operation not permitted
> error: 1 test failures
Comment 3 Andreas K. Huettel 2023-07-22 19:31:20 UTC
x86 build on x86-64 (demeter)

* baremetal

no failures

* in systemd-nspawn

FAIL: misc/test-errno-linux
FAIL: misc/tst-bz21269
FAIL: misc/tst-mlock2
FAIL: misc/tst-ntp_gettime
FAIL: misc/tst-ntp_gettime-time64
FAIL: misc/tst-ntp_gettimex
FAIL: misc/tst-ntp_gettimex-time64
FAIL: misc/tst-pkey
FAIL: misc/tst-process_mrelease
FAIL: time/tst-adjtime
FAIL: time/tst-adjtime-time64


Details from demeter:

FAIL: misc/test-errno-linux
> FAIL: mlock: errno is: 1 (Operation not permitted) expected one of LIST_FORWARD ({ 22, 12 })

FAIL: misc/tst-bz21269
> error: ../sysdeps/unix/sysv/linux/i386/tst-bz21269.c:55: not true: syscall (SYS_modify_ldt, 1, ptr, bytecount) == 0
> error: 1 test failures

FAIL: misc/tst-mlock2
> error: ../sysdeps/unix/sysv/linux/tst-mlock2.c:40: mlock: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-ntp_gettime
> error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL failed: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-ntp_gettime-time64
> error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL failed: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-ntp_gettimex
> error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL failed: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-ntp_gettimex-time64
> error: ../sysdeps/unix/sysv/linux/tst-ntp_gettime.c:46: NTP_GETTIME_SYSCALL failed: Operation not permitted
>
> error: 1 test failures

FAIL: misc/tst-pkey
> error: ../sysdeps/unix/sysv/linux/tst-pkey.c:206: pkey_alloc: Operation not permitted
> error: 1 test failures

FAIL: misc/tst-process_mrelease
> ../sysdeps/unix/sysv/linux/tst-process_mrelease.c:54: numeric comparison failure
>    left: 1 (0x1); from: errno
>   right: 9 (0x9); from: EBADF
> ../sysdeps/unix/sysv/linux/tst-process_mrelease.c:69: numeric comparison failure
>    left: 1 (0x1); from: errno
>   right: 22 (0x16); from: EINVAL
> error: 2 test failures

FAIL: time/tst-adjtime
> error: tst-adjtime.c:38: adjtime (NULL, ...) failed: Operation not permitted
> error: 1 test failures

FAIL: time/tst-adjtime-time64
> error: ./tst-adjtime.c:38: adjtime (NULL, ...) failed: Operation not permitted
> error: 1 test failures
Comment 4 Andreas K. Huettel 2023-07-22 19:32:50 UTC
PS The last comments are from git master builds at bb9a4fc02841cf58a112a44b259477547893838b