ostree
ostree copied to clipboard
sysroot-remount: umount races on shutdown
While looking into https://github.com/ostreedev/ostree/issues/2283 I noticed some possible umount races on shutdown for the the ostree bindmounts. This shows up in in the journal logs for the (automatically mirrored) mount units:
systemd[1]: Unmounting /etc...
systemd[1]: Unmounting /var...
umount[1635]: umount: /etc: target is busy.
umount[1639]: umount: /var: target is busy.
systemd[1]: etc.mount: Mount process exited, code=exited status=32
systemd[1]: Failed unmounting /etc.
systemd[1]: var.mount: Mount process exited, code=exited status=32
systemd[1]: Failed unmounting /var.
It looks like the main culprit here may be systemd
itself, in particular journald
. The logs above are on a system with systemd v239
.
On a system with a newer systemd version (v248
) I'm not seeing those races/failures. The bindmounts instead are cleaned at the bottom through systemd-shutdown
. https://github.com/systemd/systemd/pull/12230 is possibly the one that fixed it.