A partial chroot umount in the workspace leaves /dev/urandom, /dev/zero and /dev/tty as empty root-only files -- and a 5.5 h build dies on the last step
scope: generic · severity: trap · confidence: proven · subsystem: build
The mknod shim gives a chroot the container’s /dev by mount --rbind.
podman layers per-node binds inside that /dev, so pmbootstrap’s shutdown
walks dev/zero, dev/urandom, dev/tty, … as separate mounts and
unmounts them one by one until it hits dev/shm and dies (exit 32, see
what-a-rootless-workspace-cannot-do §5). Whatever it got through stays
gone: podman’s placeholder file is what is left under the mountpoint, and
nothing re-checks – /dev/null still passes [ -c ], create_device_nodes
only runs mknod for a path that does not exists(), and the
tmp/pmb_chroot_*_init_done marker skips the major/minor verification.
A compile does not open /dev/urandom. Anything that seeds a PRNG at
startup does, and WebKit’s OSRandomSource treats a failure as fatal –
so the failure lands hours in, on the last step, and reads as a qemu-user
or upstream bug. Before blaming either:
stat -c '%F %a %t:%T' /pmb/chroot_*/dev/{null,zero,full,random,urandom,tty}Every line must say character special file 666. Fix for the session:
mount --rbind /dev /pmb/chroot_buildroot_aarch64/dev (and native).
Resume rather than rebuild: the build dir survives, and
abuild -d -D postmarketOS build rootpkg update_abuildrepo_index in the
chroot as pmos with pmbootstrap’s PATH picks up at the failed step.
