[arch-general] Optimizing boot

Paul Gideon Dann pdgiddie at gmail.com
Wed Apr 30 07:56:13 EDT 2014


On Wednesday 30 Apr 2014 11:46:03 Mauro Santos wrote:
> Check the output of journalctl and look for lines with timeout (use grep
> -i timeout).
> 
> I've experienced this before (90 seconds timeout) and I found out that
> some systemd service related to the user session was not terminating,
> and systemd waits for it until the timeout elapses.
> 
> This happened to me when I had the rootfs in a f2fs partition, ext4 and
> btrfs don't seem to trigger this problem. The workaround I used at the
> time was to extend the unit file by explicitly adding a shorter timeout
> 10~15s.

Thanks, this got me on the right track. It was indeed nothing specifically to do with shutdown, 
but just a custom unit I'd written for fcgiwrap. Looks like there was some bad interaction 
between systemd trying to kill all the process tree and the master process trying to keep the 
workers alive. The unit was timing out (90 seconds, as you said). Fixed by adding:

PostExec=/usr/bin/kill $MAINPID

Reboot seems to be fine now. This was one of those things I assumed would be messy until I 
actually took the time to look into it :p That'll teach me to test custom units a little more 
carefully!

Thanks,
Paul


More information about the arch-general mailing list