[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#897221: Session logout doesn't TERMinate all processes



¡Hola Didier!

El 2018-04-30 a las 12:21 +0200, Didier 'OdyX' Raboud escribió:
Package: sddm
Version: 0.17.0-1
Severity: important
Tags: upstream

I routinely run two sessions in parallel (pro & private); and I noticed that
sddm (which I assume is handling the logind session) doesn't coherently
TERMinate (or KILL after some delay) processes from a logged-out session.

Some of these consume ressources (akonadiserver is the usual culprit), but more
importantly; keeping these alive will  break subsequent sessions for the same
user (plasma, akonadi, etc).

I guess akonadiserver is started as a detached process, so ksmserver doesn't know about it.

Anyway the problem are the processes that are in the systemd concept of session but not in the kde concept of session, those are the ones that systemd is waiting for, and ksmserver has long forgotten about them.

Please check loginctl session-status <id> (The id can be obtained with loginctl list-sessions)

Running:
	# loginctl terminate-user <zombie>
circumvents the issue, but that should really be done by the login manager.

Please tell me if there's something I can do to help here.

Mmh, this is a complex problem. Debian systemd reverts the default logind configuration KillUserProcesses, that effectively terminates the session when the user logs out, and most desktop environments assume this is set to it's default value, so they don't have to deal with the processes started by systemd --user, which, by the way, the desktop environment had nothing to do with.

Also, kde does nothing to remember which processes were started as autostart desktop files.

Gnome "fixes" this by terminating the logind session, as if KillUserProcesses was set, at the cost of breaking tmux and screen (which is the reason why Debian reverts the KillUserProcesses setting on the first place).

So, either we need to fix tmux and screen to they can be detached from the logind session, or fix the kde concept of session so it matches better what logind expects.

Happy hacking,
--
"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science."
-- Donald Knuth
Saludos /\/\ /\ >< `/

Attachment: signature.asc
Description: PGP signature


Reply to: