Page 1 of 1

systemd hangs on / fails to reboot

Posted: Sun Jun 04, 2017 8:07 pm
by sigmaris
I had this problem on Jessie, upgraded to Stretch in the hope that it'd been fixed, but it hasn't. This started happening after I'd installed some extra packages (NFS client, SSSD, Automounter and Kodi). The problem manifests as a hang on reboot, after printing "Reached target Shutdown." on the console tty1. Turning on the systemd debug shell and more systemd debugging reveals this:

Code: Select all

[  133.341005] systemd[1]: shutdown.target changed dead -> active
[  133.341062] systemd[1]: shutdown.target: Job shutdown.target/start finished, result=done
[  133.341133] systemd[1]: Reached target Shutdown.
[  133.349490] systemd[1]: final.target changed dead -> active
[  133.349542] systemd[1]: final.target: Job final.target/start finished, result=done
[  133.349610] systemd[1]: Reached target Final Step.
[  133.351816] systemd[1]: systemd-reboot.service: Passing 0 fds to service
[  133.351907] systemd[1]: systemd-reboot.service: About to execute: /bin/systemctl --force reboot
[  133.353499] systemd[1]: systemd-reboot.service: Forked /bin/systemctl as 1260
[  133.355198] systemd[1]: systemd-reboot.service: Changed dead -> start
[  133.355404] systemd[1]: Starting Reboot...
[  133.359843] systemd[1260]: systemd-reboot.service: Executing: /bin/systemctl --force reboot
[  133.382870] systemctl[1260]: Failed to connect to bus: Connection refused
[  133.385714] systemd[1]: Received SIGCHLD from PID 1260 (systemctl).
[  133.385917] systemd[1]: Child 1260 (systemctl) died (code=exited, status=1/FAILURE)
[  133.386234] systemd[1]: systemd-reboot.service: Child 1260 belongs to systemd-reboot.service
[  133.386358] systemd[1]: systemd-reboot.service: Main process exited, code=exited, status=1/FAILURE
[  133.387474] systemd[1]: systemd-reboot.service: Changed start -> failed
[  133.388646] systemd[1]: systemd-reboot.service: Job systemd-reboot.service/start finished, result=failed
[  133.388748] systemd[1]: Failed to start Reboot.
To me it looks like systemd is reaching the final stages of rebooting, then running /bin/systemctl --force reboot which fails because of "Failed to connect to bus: Connection refused". Sounds like it's trying to use DBUS at this point, but by this time in the reboot process DBUS has been stopped. I don't see how this is meant to work in this case. Has anyone else seen this problem or knows a fix?