Bug 55272 - logind: Session.kill_processes not working
Summary: logind: Session.kill_processes not working
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 06:53 UTC by Matthew Monaco
Modified: 2014-02-21 17:33 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Matthew Monaco 2012-09-24 06:53:45 UTC
There's a bit of an issue with the kill-session-processes=1 logic. When session_check_gc() is called, session_remove_fifo() hasn't been called yet, so gc can't happen on the session.

Additionally, the check for cg_is_empty_recursive() might need to be guarded by s->cgroup_path && !s->kill_processes because we don't care if the cgroup is empty in this situation.
Comment 1 Matthew Monaco 2012-09-26 19:01:52 UTC
I was backwards there. In response to dbus ReleaseSession(), session_remove_fifo() is called. But this doesn't have any effect until we're in session_check_gc(), which normally isn't called until the session is but in the GC Queue.

However, normally, the way the session is put in the GC Queue is after logind receivs the dbus signal that the sessions cgroup is empty. This obviously won't happen in cases where kill-user-sessions=1 is actually required.

(I still think gc_is_empty_recursive() in session_check_gc() should be guarded by !s->kill_processes)
Comment 2 Lennart Poettering 2014-02-21 17:33:03 UTC
This should work fin with 209.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.