Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907778 - sys-apps/sandbox - utime family sets errno = ENOSYS
Summary: sys-apps/sandbox - utime family sets errno = ENOSYS
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords: TESTFAILURE
: 910599 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-06-03 17:09 UTC by Toralf Förster
Modified: 2023-07-22 01:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.17 KB, text/plain)
2023-06-03 17:10 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,14.98 KB, text/plain)
2023-06-03 17:10 UTC, Toralf Förster
Details
environment (environment,94.45 KB, text/plain)
2023-06-03 17:10 UTC, Toralf Förster
Details
etc.clang.tar.bz2 (etc.clang.tar.bz2,737 bytes, application/x-bzip)
2023-06-03 17:10 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,10.42 KB, application/x-bzip)
2023-06-03 17:10 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,40.89 KB, application/x-bzip)
2023-06-03 17:10 UTC, Toralf Förster
Details
sys-apps:sandbox-2.30-r1:20230603-170053.log.bz2 (sys-apps:sandbox-2.30-r1:20230603-170053.log.bz2,10.95 KB, application/x-bzip)
2023-06-03 17:10 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,35.38 KB, application/x-bzip)
2023-06-03 17:10 UTC, Toralf Förster
Details
tests.tar.xz (tests.tar.xz,730.34 KB, application/x-bzip)
2023-06-03 17:30 UTC, Toralf Förster
Details
strace-sandbox.log (strace-sandbox.log,69.80 KB, text/plain)
2023-07-21 17:46 UTC, Toralf Förster
Details
sys-apps:sandbox-2.37:20230721-175600.log.gz (sys-apps:sandbox-2.37:20230721-175600.log.gz,20.06 KB, application/x-gzip)
2023-07-21 18:00 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-06-03 17:09:59 UTC
## ------------- ##
## Test results. ##
## ------------- ##

ERROR: 65 tests were run,
5 failed unexpectedly.
30 tests were skipped.
## -------------------------- ##

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-j5_test-20230603-114005

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
/usr/lib/llvm/15
15.0.7
Python 3.11.3
Available Rust versions:
  [1]   rust-bin-1.69.0 *
php cli (if any):
go version go1.20.4 linux/amd64

  HEAD of ::gentoo
commit 1e579fe3c1aec9f36bfa51ab452ac0885a025004
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Jun 3 11:31:56 2023 +0000

    2023-06-03 11:31:55 UTC

emerge -qpvO sys-apps/sandbox
[ebuild     U ] sys-apps/sandbox-2.30-r1 [2.29] USE="nnp" ABI_X86="(32) (64) (-x32)"
Comment 1 Toralf Förster gentoo-dev 2023-06-03 17:10:01 UTC
Created attachment 863132 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-06-03 17:10:02 UTC
Created attachment 863133 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-06-03 17:10:03 UTC
Created attachment 863134 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-06-03 17:10:03 UTC
Created attachment 863135 [details]
etc.clang.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2023-06-03 17:10:04 UTC
Created attachment 863136 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2023-06-03 17:10:05 UTC
Created attachment 863137 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2023-06-03 17:10:06 UTC
Created attachment 863138 [details]
sys-apps:sandbox-2.30-r1:20230603-170053.log.bz2
Comment 8 Toralf Förster gentoo-dev 2023-06-03 17:10:07 UTC
Created attachment 863139 [details]
temp.tar.bz2
Comment 9 Toralf Förster gentoo-dev 2023-06-03 17:10:08 UTC
The file size of ./files/tests.tar.bz2 is too big (4.2M) for an upload. For about 8 weeks the link http://tinderbox.zwiebeltoralf.de:31560/17.1_desktop_plasma_systemd-j5_test-20230603-114005/var/tmp/tb/issues/20230603-170131-sys-apps_sandbox-2.30-r1/files/tests.tar.bz2 is valid.
Comment 10 Toralf Förster gentoo-dev 2023-06-03 17:30:54 UTC
Created attachment 863140 [details]
tests.tar.xz
Comment 11 Mike Gilbert gentoo-dev 2023-07-09 02:05:32 UTC
It looks like the utime-related functions are returning ENOSYS.

FAIL: futimesat(-100, ".", (nil)) = -1 (wanted 0); errno = ENOSYS:38 [Function not implemented] (wanted Success:0 [Success])
FAIL: futimesat(3, "(null)", (nil)) = -1 (wanted 0); errno = ENOSYS:38 [Function not implemented] (wanted Success:0 [Success])
FAIL: utimensat(-100, ".", (nil), 0) = -1 (wanted 0); errno = ENOSYS:38 [Function not implemented] (wanted Success:0 [Success])
FAIL: utimensat(-100, "sym", 0x57e111a0, 100) = -1 (wanted -1); errno = ENOSYS:38 [Function not implemented] (wanted EINVAL:22 [Invalid argument])
FAIL: utimensat(-100, ".", (nil), 0) = -1 (wanted 0); errno = ENOSYS:38 [Function not implemented] (wanted Success:0 [Success])

I suspect this is being caused by a container manager blocking these syscalls. Please look into that and report back if you find something.
Comment 12 Toralf Förster gentoo-dev 2023-07-09 15:32:30 UTC
(In reply to Mike Gilbert from comment #11)
> It looks like the utime-related functions are returning ENOSYS.
> 
> FAIL: futimesat(-100, ".", (nil)) = -1 (wanted 0); errno = ENOSYS:38
> [Function not implemented] (wanted Success:0 [Success])

> I suspect this is being caused by a container manager blocking these
> syscalls. Please look into that and report back if you find something.

upstream says no [1] and I do not block any special calls[2]


[1] https://github.com/containers/bubblewrap/issues/584
[2] https://github.com/toralf/tinderbox/blob/main/bin/bwrap.sh#L115
Comment 13 Mike Gilbert gentoo-dev 2023-07-09 17:44:02 UTC
Regardless, I am unable to reproduce this.
Comment 14 Mike Gilbert gentoo-dev 2023-07-21 02:46:46 UTC
*** Bug 910599 has been marked as a duplicate of this bug. ***
Comment 15 Mike Gilbert gentoo-dev 2023-07-21 03:26:11 UTC
Please try to reproduce this manually in a similar environment.

After the tests fail, please run the following from the build directory.

strace -o strace-nosandbox.log -f tests/utimensat-0 0 AT_FDCWD . NULL 0

strace -o strace-sandbox.log -f ./src/sandbox.sh tests/utimensat-0 0 AT_FDCWD . NULL 0

Then attach the resulting strace logs.
Comment 16 Toralf Förster gentoo-dev 2023-07-21 14:57:23 UTC
(In reply to Mike Gilbert from comment #13)
> Regardless, I am unable to reproduce this.

with USE=nnp ?
Comment 17 Toralf Förster gentoo-dev 2023-07-21 15:01:50 UTC
(In reply to Mike Gilbert from comment #15)
> Please try to reproduce this manually in a similar environment.
> 
> After the tests fail, please run the following from the build directory.
> 
> strace -o strace-nosandbox.log -f tests/utimensat-0 0 AT_FDCWD . NULL 0
> 
> strace -o strace-sandbox.log -f ./src/sandbox.sh tests/utimensat-0 0
> AT_FDCWD . NULL 0
> 
> Then attach the resulting strace logs.

I found that utimensat-0 only in the _32 directory:

17-1-desktop-plasma-systemd-test-20230720-150508 /var/tmp/portage/sys-apps/sandbox-2.37/work/sandbox-2.37-abi_x86_32.x86 # strace -o strace-nosandbox.log -f tests/utimensat-0 0 AT_FDCWD . NULL 0
FAIL: utimensat(-100, ".", (nil), 0) = -1 (wanted 0); errno = ENOSYS:38 [Function not implemented] (wanted Success:0 [Success])

17-1-desktop-plasma-systemd-test-20230720-150508 /var/tmp/portage/sys-apps/sandbox-2.37/work/sandbox-2.37-abi_x86_32.x86 # strace -o strace-sandbox.log -f ./src/sandbox.sh tests/utimensat-0 0 AT_FDCWD . NULL 0
FAIL: utimensat(-100, ".", (nil), 0) = -1 (wanted 0); errno = ENOSYS:38 [Function not implemented] (wanted Success:0 [Success])
Comment 18 Mike Gilbert gentoo-dev 2023-07-21 17:35:31 UTC
(In reply to Toralf Förster from comment #17)

Please attach the strace log files.
Comment 19 Mike Gilbert gentoo-dev 2023-07-21 17:40:40 UTC
(In reply to Toralf Förster from comment #16)
> (In reply to Mike Gilbert from comment #13)
> > Regardless, I am unable to reproduce this.
> 
> with USE=nnp ?

I am unable to reproduce the issue with either USE=-nnp or USE=nnp.
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-21 17:44:12 UTC
(In reply to Mike Gilbert from comment #13)
> Regardless, I am unable to reproduce this.

Are you trying under bubblewrap, as toralf is?
Comment 21 Toralf Förster gentoo-dev 2023-07-21 17:46:25 UTC
Created attachment 865898 [details]
strace-sandbox.log
Comment 22 Mike Gilbert gentoo-dev 2023-07-21 17:49:28 UTC
(In reply to Sam James from comment #20)
> (In reply to Mike Gilbert from comment #13)
> > Regardless, I am unable to reproduce this.
> 
> Are you trying under bubblewrap, as toralf is?

Yes, I have tried to reproduce it under bubblewrap with no success.
Comment 23 Mike Gilbert gentoo-dev 2023-07-21 17:53:45 UTC
Recapping toralf's results:

1. utimensat fails with ENOSYS both inside and outside the sandbox.

2. The strace log shows that the kernel is setting errno to ENOSYS.

18149 utimensat(AT_FDCWD, ".", NULL, 0) = -1 ENOSYS (Function not implemented)

It's clear that there is something wrong in toralf's environment, but I'm pretty sure sys-apps/sandbox is not to blame.
Comment 24 Mike Gilbert gentoo-dev 2023-07-21 17:54:48 UTC
I would be interested to see if you get the same test results on the host system, outside of any tinderbox environment.
Comment 25 Toralf Förster gentoo-dev 2023-07-21 18:00:44 UTC
Created attachment 865899 [details]
sys-apps:sandbox-2.37:20230721-175600.log.gz

log from host system
Comment 26 Mike Gilbert gentoo-dev 2023-07-21 18:10:56 UTC
Ok, so the tests work on the host. That rules out a buggy kernel.

My best guess still is that there is a seccomp filter being applied at some stage in the tinderbox setup process that is causing an ENOSYS result for utimensat.
Comment 27 Toralf Förster gentoo-dev 2023-07-21 18:53:43 UTC
(In reply to Mike Gilbert from comment #26)
> Ok, so the tests work on the host. That rules out a buggy kernel.

Test fails using chroot too - that rules out bubblewrap IMO.
Comment 28 Mike Gilbert gentoo-dev 2023-07-21 19:04:47 UTC
Are you using some exotic filesystem for the tinderbox images? Maybe it's a filesystem bug.
Comment 29 Toralf Förster gentoo-dev 2023-07-21 19:06:54 UTC
(In reply to Mike Gilbert from comment #28)
> Are you using some exotic filesystem for the tinderbox images? Maybe it's a
> filesystem bug.

It is a striped BTRFS using 2 drives (/dev/nvme0n1p4 and /dev/nvme1n1p4)
Comment 30 Mike Gilbert gentoo-dev 2023-07-21 19:10:30 UTC
Ok, I use btrfs myself so that's probably not it.
Comment 31 Mike Gilbert gentoo-dev 2023-07-21 19:49:36 UTC
In IRC, we determined that the CONFIG_COMPAT_32BIT_TIME kernel option is disabled, which means the 32-bit version of utimensat is not defined in the kernel.
Comment 32 Mike Gilbert gentoo-dev 2023-07-22 01:08:35 UTC
This series of glibc changes basically makes CONFIG_COMPAT_32BIT_TIME a required option. If it is disabled, all sorts of syscalls with time parameters may stop working for 32-bit ABIs.

https://sourceware.org/git/?p=glibc.git;a=log;h=6d97330d7acc47898b3a2bf4c8588d4bd7114269

I don't really see a good workaround, so I'm closing this as CANTFIX.