System Hangs on Shutdown


Arch Linux Hangs on Shutdown


After a systemd upgrade, the system started to hang on shutdown/reboot, with the console indicating it was waiting on a user session.

Per this bug report, it looks like some process is dumping core during shutdown (do I care at this point?).

The core pattern is:

$ cat /proc/sys/kernel/core_pattern
|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e

So, something dumps core during shutdown and the data is piped to systemd, which is trying to shutdown, and the 90 second wait ensues…

I created a systemd unit file to change the core pattern to /dev/null on shutdown:

$ cat /etc/systemd/system/fix_core.service
Description=Fix core.

ExecStop=echo "/dev/null" > /proc/sys/kernel/core_pattern


I'm not ordering the unit, so that could be better, but so far, this works for me.