Closed shocklateboy92 closed 2 weeks ago
@shocklateboy92 Can you give me a reproducer with distrobox by any chance? I can't figure it out from just the logs unfortunately.
Or even better, run again with the newly added --debug-sandbox
and post the output back here.
I'm not sure if it's the same issue, because I get slightly further, but in case it helps: trying to build an arch image from a toolbx container on a Fedora host, the "installing arch" step fails because pacman cannot update its keyring.
Applying the suggested strace trick, and dropping inside a debug shell to check the permissions of /etc/pacman.d/gnupg :
$ sudo ~/src/mkosi/bin/mkosi -d arch --debug-shell build
[…]
write(1, "downloading required keys...\n", 29downloading required keys...
) = 29
faccessat2(AT_FDCWD, "/etc/pacman.d/gnupg/pubring.gpg", W_OK, AT_SYMLINK_NOFOLLOW) = -1 EROFS (Read-only file system)
write(2, "\33[1;31merror: \33[0m", 18error: ) = 18
write(2, "keyring is not writable\n", 24keyring is not writable
) = 24
faccessat2(AT_FDCWD, "/etc/pacman.d/gnupg/pubring.gpg", W_OK, AT_SYMLINK_NOFOLLOW) = -1 EROFS (Read-only file system)
write(2, "\33[1;31merror: \33[0m", 18error: ) = 18
write(2, "keyring is not writable\n", 24keyring is not writable
) = 24
write(2, "\33[1;31merror: \33[0m", 18error: ) = 18
write(2, "required key missing from keyrin"..., 34required key missing from keyring
) = 34
write(2, "\33[1;31merror: \33[0m", 18error: ) = 18
write(2, "failed to commit transaction (un"..., 48failed to commit transaction (unexpected error)
) = 48
write(1, "Errors occurred, no packages wer"..., 44Errors occurred, no packages were upgraded.
) = 44
close(6) = 0
unlink("/var/lib/pacman/db.lck") = 0
ioctl(1, TCGETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
write(1, "\33[?25h", 6) = 6
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f43304fed00}, NULL, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f43304fed00}, NULL, 8) = 0
close(5) = 0
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f43304fed00}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f43304fed00}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f43304fed00}, NULL, 8) = 0
close(3) = 0
close(4) = 0
exit_group(1) = ?
+++ exited with 1 +++
‣ "strace pacman --root=/buildroot --logfile=/dev/null --dbpath=/var/lib/pacman --cachedir=/var/cache/pacman/mkosi --cachedir=/var/cache/pacman/pkg --hookdir=/buildroot/etc/pacman.d/hooks --arch x86_64 --color auto --noconfirm --sync --needed --assume-installed initramfs filesystem" returned non-zero exit code 1.
bash-5.2# mount | grep /etc
/dev/mapper/luks-21843c83-977a-4bc3-87ce-d8e2c17e2ea9 on /etc type btrfs (rw,nosuid,nodev,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=257,subvol=/home)
overlay on /etc/alternatives type overlay (ro,nosuid,nodev,relatime,context="system_u:object_r:container_file_t:s0:c1022,c1023",lowerdir=/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6:/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6/../diff1:/var/home/kerneis/.local/share/containers/storage/overlay/l/T2DJSVAW4EUOXX62SNB4NQFGG3,upperdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/diff,workdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/work,redirect_dir=nofollow,userxattr)
overlay on /etc/pacman.d/gnupg type overlay (ro,nosuid,nodev,relatime,context="system_u:object_r:container_file_t:s0:c1022,c1023",lowerdir=/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6:/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6/../diff1:/var/home/kerneis/.local/share/containers/storage/overlay/l/T2DJSVAW4EUOXX62SNB4NQFGG3,upperdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/diff,workdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/work,redirect_dir=nofollow,userxattr)
overlay on /etc/pki type overlay (ro,nosuid,nodev,relatime,context="system_u:object_r:container_file_t:s0:c1022,c1023",lowerdir=/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6:/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6/../diff1:/var/home/kerneis/.local/share/containers/storage/overlay/l/T2DJSVAW4EUOXX62SNB4NQFGG3,upperdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/diff,workdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/work,redirect_dir=nofollow,userxattr)
tmpfs on /etc/resolv.conf type tmpfs (rw,nosuid,nodev,seclabel,size=3112996k,nr_inodes=819200,mode=755,inode64)
overlay on /etc/ssl type overlay (ro,nosuid,nodev,relatime,context="system_u:object_r:container_file_t:s0:c1022,c1023",lowerdir=/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6:/var/home/kerneis/.local/share/containers/storage/overlay/l/H6CGS6BDH2CCJCTK36KJRUYXX6/../diff1:/var/home/kerneis/.local/share/containers/storage/overlay/l/T2DJSVAW4EUOXX62SNB4NQFGG3,upperdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/diff,workdir=/var/home/kerneis/.local/share/containers/storage/overlay/712c7d3ff6824e6e94a353b36e88d3058ff1a16e89099e7d033030ac9e8dc8f5/work,redirect_dir=nofollow,userxattr)
bash-5.2#
@kerneis-anssi This is expected, you have to make sure the keyring is up-to-date before invoking mkosi, unrelated to this issue.
Here is the output with --debug-sandbox
debug-sandbox-output-stderr.txt debug-sandbox-output-stdout.txt
Hey, so the machine rebooted and I can no longer reproduce the issue even on the same distrobox.
I really appreciate the effort to understand the root cause, but I don't see that being feasible anymore :face_with_diagonal_mouth:
Closing till I can find another way to reproduce the issue.
mkosi commit the issue has been seen with
a15a97da5a102414bdd461e92e9faabf899692cc
Used host distribution
Arch Linux
Used target distribution
Arch Linux
Linux kernel version used
6.11.6-arch1-1
CPU architectures issue was seen on
x86_64
Unexpected behaviour you saw
Crashed with the provided output when building inside an ArchLinux distrobox (docker) container.
Used mkosi config
mkosi output