[systemd-devel] A way to debug machine shutdown

Lennart Poettering lennart at poettering.net
Tue May 12 08:18:08 UTC 2020


On Di, 12.05.20 11:09, darkpenguin (darkpenguin at yandex.com) wrote:

> > Current versions (since ~231 iirc) of systemd log about the processes
> > they kill due to timeouts. You should find that in the logs.
>
> Package: systemd
> Version: 241-7~deb10u3
>
> I wanted to make sure I'm not missing something about the intended way
> to troubleshoot problems like those. Seems like I'm not.
>
> In my case, it's hard to pinpoint: different processes every time, and
> no information about what's going on. It would have been trivial if
> systemd had more useful outputs, which is what I want to suggest.

Please turn on debug logging "systemd-analyze log-level debug", then
reproduce the issue, and paste the generated logs somewhere
(fpaste.org or so).

> Instead of 90 seconds of "Waiting for session-1.scope ... ", which gives
> us next to zero information about the real source of the problem, why
> not also mention exactly which process is the problem? Or even
> better, a

Again, as  mentioned above, we already do that. That's what I wrote
above.

> tree of what's still alive in that scope. And the last few lines in the
> problematic process' log to see the problem from their side. And/or a
> hint about what command to run to see this information later. (I could
> not find a way to see the service logs from yesterday in 'man
> systemctl', and seeing the scope tree from this moment in the logs is
> hardly possible, so being able to see it on the screen for 90 seconds
> and then never see it again is the best we can do.)

"journalctl" is the way to access logs on systemd systems. Please have
a look there, or paste them so that we can have a look.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list