when upgrading from sandbox-2.29 to new stable sandbox-2.30-r1 on armv7a-musl, the new sandbox instance is fundamentally broken: sandbox:main could not open the sandbox rc file: /usr/share/sandbox/sandbox.bashrc: Invalid argument followd by this: * The ebuild phase 'unpack' has exited unexpectedly. This type of behavior * is known to be triggered by things such as failed variable assignments * (bug #190128) or bad substitution errors (bug #200313). Normally, before * exiting, bash should have displayed an error message above. If bash did * not produce an error message above, it's possible that the ebuild has * called `exit` when it should have called `die` instead. This behavior * may also be triggered by a corrupt bash binary or a hardware problem * such as memory or cpu malfunction. If the problem is not reproducible or * it appears to occur randomly, then it is likely to be triggered by a * hardware problem. If you suspect a hardware problem then you should try * some basic hardware diagnostics such as memtest. Please do not report * this as a bug unless it is consistently reproducible and you are sure * that your bash binary and hardware are functioning properly. this is all it does when trying to emerge just any package please mask on all musl profiles
Created attachment 864141 [details] output from emerge --info also all tests are failing
I can't reproduce this on amd64 + musl. I'll check it on arm now.
(In reply to Sam James from comment #2) > I can't reproduce this on amd64 + musl. I'll check it on arm now. Can't reproduce. Please include the full 'strace -f' output of a failing command (full emerge if necessary, but try e.g. 'strace -f sandbox uptime' first).
Created attachment 864160 [details] output of strace -f sandbox uptime something is missing: faccessat2(AT_FDCWD, "/var/log/sandbox/sandbox-23890.log", F_OK, AT_SYMLINK_NOFOLLOW) = -1 ENOSYS (Function not implemented) check libsandbox/pre_check_openat.c, it was added there with sandbox-2.30: https://gitweb.gentoo.org/proj/sandbox.git/tree/libsandbox/pre_check_openat.c#n22
faccessat2 was added in Linux 5.8. You appear to be running Linux 4.19.x.
The issue was probably introduced here: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=f63fea69097e37424c700f820d25591747a15752
*** Bug 908766 has been marked as a duplicate of this bug. ***
The behavior on musl seems to be different from glibc. On glibc, if faccessat2 fails with ENOSYS, it calls fstatat (or newfstatat on amd64) as a fallback. > faccessat2(AT_FDCWD, "/dev/null", F_OK, AT_SYMLINK_NOFOLLOW) = -1 ENOSYS (Function not implemented) > newfstatat(AT_FDCWD, "/dev/null", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1, 0x3), ...}, AT_SYMLINK_NOFOLLOW) = 0
musl bug report: https://www.openwall.com/lists/musl/2023/06/19/1
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=b55840ebe3278032777a3b52cecc6dac325dcf85 commit b55840ebe3278032777a3b52cecc6dac325dcf85 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-06-19 15:50:46 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-06-21 14:40:08 +0000 libsbutil: add sb_exists function This provides a central place to work around a bug on musl where faccessat sets errno to EINVAL when the kernel does not support faccessat2. Bug: https://bugs.gentoo.org/908765 Signed-off-by: Mike Gilbert <floppym@gentoo.org> libsandbox/pre_check_openat.c | 2 +- libsandbox/wrapper-funcs/fopen_pre_check.c | 2 +- libsbutil/local.mk | 1 + libsbutil/sb_exists.c | 24 ++++++++++++++++++++++++ libsbutil/sbutil.h | 1 + libsbutil/src/file.c | 2 +- 6 files changed, 29 insertions(+), 3 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1581bf33d00a80115a4f78bcb292faccc962a700 commit 1581bf33d00a80115a4f78bcb292faccc962a700 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-06-21 14:54:13 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-06-21 14:55:16 +0000 sys-apps/sandbox: add 2.32 Closes: https://bugs.gentoo.org/908765 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/sandbox/Manifest | 1 + sys-apps/sandbox/sandbox-2.32.ebuild | 64 ++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=609dd64e6e88b8abbbd424c24e5e40abe95cdb1c commit 609dd64e6e88b8abbbd424c24e5e40abe95cdb1c Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-06-19 15:50:46 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-06-21 14:41:51 +0000 libsbutil: add sb_exists function This provides a central place to work around a bug on musl where faccessat sets errno to EINVAL when the kernel does not support faccessat2. Bug: https://bugs.gentoo.org/908765 Signed-off-by: Mike Gilbert <floppym@gentoo.org> (cherry picked from commit b55840ebe3278032777a3b52cecc6dac325dcf85) libsandbox/pre_check_openat.c | 2 +- libsandbox/wrapper-funcs/fopen_pre_check.c | 2 +- libsbutil/local.mk | 1 + libsbutil/sb_exists.c | 24 ++++++++++++++++++++++++ libsbutil/sbutil.h | 1 + libsbutil/src/file.c | 2 +- 6 files changed, 29 insertions(+), 3 deletions(-)