I am seeing something similar on 20.04. If my network fails and I have any network filesystems mounted (including nfs3 or nfs4 via autofs or iSCSI via fstab) when I issue a shutdown or reboot command, then I am likely to have a 10+ minute delay after the console displays that it has reached target shutdown. The console will then cycle through displaying information about each filesystem, such as the fact that the system is trying to unmount it, the unmount failed, and it is now forcibly killing processes. While I have not looked at the source, the timing of the console messages would imply that the process to unmount filesystems and kill processes is single-threaded, as there is a significant delay as it goes through this process with each filesystem. After it has cycled through all filesystems, it then slowly cycles through each filesystem again. Unfortunately, the logging system has already shut down by the time any of this happens, so I have no logs in journald or syslog to submit in relationship to this issue.
Can the process be fixed to only cycle through each filesystem once, and also to attempt to do multiple filesystems simultaneously so that, at worst, I only have to wait through one timeout cycle? I could possibly see a reason that you might need to wait the timeout multiple times in the event of nested remote filesystems (e.g. if every level of /dont/try/this/at/home was a different filesystem on non-local disk), but that is not the configuration that I have. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1932525 Title: This bug is back on my pc - bug #1722481 Systemd Sync twice at shutdown Status in systemd package in Ubuntu: Confirmed Bug description: systemd should sync disks, before killing all processes on shutdown: bug #1722481 has returned. Is it possible this bug returned in ubuntu 21.04 - hirsute? see my systemd-shutdown in the txt file attached. ..or is a workaround possible for this? I notice this behavior when i shutdown and reboot. the laptop needs almost no time to shutdown, and then for 20 maybe 30 seconds the plymouth screen comes back with the rotating sign, waiting to sync probably, then the screen goes black and shutdown. my laptop is a HP elitebook 820 with ssd hdd. - snap of text of original bugreport - [Impact] * systemd-shutdown binary is executed to complete system shutdown. In xenial, it calls sync() after killing all processes, and not before killing them. This means that processes are racing the SIGKILL/TERM timeouts to sync all IO to disk. To mitigate this race condition, and make the shutdown process more reliable the sync() should also happen before process killing spree starts. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1932525/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp

