[systemd-devel] systemd hangs on shutdown
Daniel Drake
dsd at laptop.org
Thu Sep 29 07:49:28 PDT 2011
On Thu, Sep 29, 2011 at 2:29 PM, Daniel Drake <dsd at laptop.org> wrote:
> Full log of startup, shutdown, and sysrq dumps at point of first hang
> (before systemd-stdout-syslog-bridge.service wakeup), and second hang,
> then sysrq dumps again:
> http://dev.laptop.org/~dsd/20110929/systemd-shutdown-hang-debug.txt
I've tried to correspond this to the systemd source and unit files and
I think I might have found something of relevance.
One of the last links in the chain is that poweroff.service gets
started and calls "systemctl --force poweroff", right?
In my log, poweroff.service gets "installed" to be run:
[ 57.887771] systemd[1]: Installed new job poweroff.service/start as 243
but never gets run. By that I mean: When other services are queued to
be started, they later get started with "About to execute" messages
e.g.
[ 57.941081] systemd[1]: Installed new job alsa-store.service/start as 250
[ 60.373390] systemd[1]: About to execute: /sbin/alsactl store
[ 60.450713] systemd[1]: Forked /sbin/alsactl as 1505
[ 60.456367] systemd[1]: alsa-store.service changed dead -> start
However, the poweroff.service never gets any of the 'about to
execute', 'forked' or 'dead->start' messages. It actually gets stopped
for some reason, perhaps before it has had a chance to do its thing?
[ 57.887771] systemd[1]: Installed new job poweroff.service/start as 243
snip
[ 87.312551] systemd[1]: Installed new job poweroff.service/stop as 347
[ 87.340953] systemd[1]: Job poweroff.service/stop finished, result=done
However, I think it should have been ready to run. from
poweroff.service, its requirements/dependencies are:
Requires=shutdown.target umount.target final.target
After=shutdown.target umount.target final.target
and all of those seem to have finished:
[ 87.255264] systemd[1]: Job shutdown.target/start finished, result=done
[ 87.284275] systemd[1]: Job final.target/start finished, result=done
[ 87.353693] systemd[1]: Job umount.target/stop finished, result=done
Am I onto something here, or am I going in the wrong direction?
Debugging tips much appreciated.
cheers
Daniel
More information about the systemd-devel
mailing list