[systemd-devel] Antw: Re: Antw: Re: failing unmounts during reboot

Lennart Poettering lennart at poettering.net
Mon Jul 29 12:11:50 UTC 2019


On Mo, 29.07.19 14:05, Ulrich Windl (Ulrich.Windl at rz.uni-regensburg.de) wrote:

> > Key here is that these scope units are ordered after
> > systemd‑user‑sessions.service, which also means they are terminated
> > before that service is terminated (since in systemd the shutdown order
> > is always the inverse of the startup order).
>
> I'm afraid the original answer was wrong: "We automatically kill all unpriv
> user programs on shutdown."
>
> If a user started a process outside of systemd, systemd does not
> list that.

I am not sure what "outside of systemd" is supposed to mean? If
systemd is PID 1 all userspace runs under systemd's supervision.

> I'm also surprised who _few_ scopes are being shown:

How many should be there? It shows active sessions. i.e. for each
entry in "loginctl list-sessions"'s output one (plus one for each
session that ended but still has processes running, i.e. is abandoned,
see below).

Consider using "systemd-cgls" to see the general structure of your
system in regards to services, scopes and such.

> 3 loaded units listed.
> To show all installed unit files use 'systemctl list-unit-files'.
>
> Where is the rest?

Not sure what the "rest" is supposed to mean.

> Also, the "abandonded" session has a process that is very much active:

An "abandoned" scope is one the app that created it has lost interest
in or died. logind is one such app, and as mentioned creates a scope
unit for each session. And it abandons the scope for a session it
manages when a session ends but there are still processes in the scope
left.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list