Dear Maintainer, On two recent clean installations of Buster, I am noticing that choosing to install package updates through gnome-software, and therefore the systemd offline update system, results in the root filesystem not being unmounted properly once packages are installed and therefore gives an fsck error on reboot: Failed to remount '/' read-only; Device or resource busy Followed by journal recovery on reboot. I haven't noticed any serious problems subsequently but it seems like asking for trouble for the filesystem to not be cleanly unmounted right after packages are updated. I have seen this on two machines, neither using 3rd party repos etc. Thanks for your time.
Am 29.11.20 um 19:23 schrieb Josh: Can you please provide a (debug) journal log from such an offline update. Michael
Sorry which log do you mean by debug journal log? Apologies for my ignorance. (Incidentally this problem has occured on two out of three offline updates in recent days)
Am 01.12.20 um 18:02 schrieb Josh Jones: Enable persistent journal (see /usr/share/doc/systemd/README.Debian.gz) When booting into the offline based upgrade, add "systemd.log_level=debug" to the kernel command line. After booting into your regular system again after the upgrade, dump the journal from the previous boot (as root) journalctl -alb-1 (b-1 means, boot - 1, i.e. previous boot) Michael
Am 01.12.20 um 18:02 schrieb Josh Jones: So, I tried this in a test VM. The offline update went just fine (see attached journal.txt), so I can't reproduce the issue locally and we will need at the very least at journal log. Michael
No worries - I will send you the debug journal at the next package update - or if I have time tomorrow I will try to install outdated versions of the packages last updated to force it to happen. Whatever is happening is pretty consistent for me by the looks of it. I have just enabled persistent logging. Josh
Please see attached debug log from last offline update. It failed to unmount cleanly again. Apologies it took a few days to provide this. Josh
Am 06.12.2020 um 12:45 schrieb Josh Jones: I don't see a failed unmount attempts in this log unfortunately. Or am I missing something? Which file system(s) in particular did not unmount cleanly? You might also have a look at https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/README.Debian "Debugging boot/shutdown problems" to gather logs after journald has been shut down. Michael
It is the root filesystem which is failing to be remounted read-only - this is a simple setup with only one filesystem for the whole system. It seems to be happening right at the very very end of the shutdown sequence - I have attached a picture of the error; quality is poor because I had to capture it from video footage. Is there any way to even have anything saved to disk so late in the sequence? Thanks for your help and attention with this; I'm willing to try whatever you suggest to help work out what's going on - if that is even possible..! Josh
Am 06.12.20 um 17:04 schrieb Josh Jones: With the shutdown hook described in README.Debian and https://freedesktop.org/wiki/Software/systemd/Debugging/#index2h1 (install the hook as /lib/systemd/system-shutdown/debug.sh without the /usr prefix) you can gather logs right until the end
Am Sonntag, den 06.12.2020, 19:28 +0100 schrieb Michael Biebl: Copy the attached script to /lib/systemd/system-shutdown/, make it executable with chmod +x, then add systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M to the kernel command line and after the reboot, attach the file /shutdown-log.txt to this bug report. Michael
Amazing, that has taught me something very useful! shutdown-log.txt attached and error is visible! Josh
Am 08.12.20 um 20:39 schrieb Josh Jones: Thanks. So from a quick glance it seems fwupd keeps your / busy and prevents it from being remounted ro. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953679 looks related If you don't have a system/BIOS vendor supported by fwupd, you might consider purging the package to verify that the problem is solved. Michael
Am 08.12.20 um 21:05 schrieb Michael Biebl: Given the existing information, I'm going to reassign this to fwupd Regards, Michael
I don't know enough to be sure of this, but I think perhaps this bug should be reassigned against plymouthd rather than fwupd; I've attached the output of "lsof /" both with and without plymouth, plymouthd and libplymouth installed. You can see that plymouth has files open read- write right at the end of the shutdown process. When plymouth is installed, this bug occurs. When not installed it does not - though admittedly different packages were updated in the working example, after some time and various package updates later I have still not seen this bug after removing plymouth. Josh