[systemd-devel] A way to debug machine shutdown

Dark Penguin darkpenguin at yandex.com
Sun Apr 26 16:08:27 UTC 2020


Very often I have encountered one problem: during shutdown, systemd has
to wait for something. Of course, it is probably different things every
time, and it is probably not systemd's fault, at least some of the cases.

This leads to the question: how do we find out the root of the problem?
Systemd has a lot of good tools for debugging, but using them is not as
easy as it seems, and the Internet is not much help either.

Naturally, reading the output and the journal would be the first step.
On the screen, it was "A stop job is running for session 1 of user
myuser". In the journal, there is:

Apr 26 18:46:56 DEUS systemd[1]: session-1.scope: Stopping timed out.
Killing.
Apr 26 18:46:56 DEUS systemd[1]: session-1.scope: Failed with result
'timeout'.
Apr 26 18:46:56 DEUS systemd[1]: Stopped Session 1 of user myuser.
Apr 26 18:46:56 DEUS systemd[1]: Stopping Login Service...
Apr 26 18:46:56 DEUS systemd[1]: Stopping User Manager for UID 1000...
Apr 26 18:46:56 DEUS systemd-logind[809]: Removed session 1.

Now how do I check exactly what was the problem in that session?


-- 
darkpenguin


More information about the systemd-devel mailing list