KillUserProcesses=yes does not work under systemd-shim

Bug #1355966 reported by Serge Hallyn
74
This bug affects 22 people
Affects Status Importance Assigned to Milestone
cgmanager (Ubuntu)
Fix Released
High
Unassigned
systemd-shim (Ubuntu)
Triaged
High
Serge Hallyn

Bug Description

When enabling KillUserProcesses=yes in /etc/systemd/logind.conf, user background processes and logind sessions aren't actually being killed/cleaned up after logout. This works fine under systemd, but not under upstart with systemd-shim.

= Original report =

Currently, logout produces the following error in upstart systems:

systemd-logind[15351]: Failed to abandon scope session-c7.scope
systemd-logind[15351]: Failed to abandon session scope: No such interface 'org.freedesktop.systemd1.Scope' on object at path /org/freedesktop/systemd1/unit/session_2dc7_2escope

Whlie the cgroup is being autoremoved when empty, the more important bug is that StopSession won't forcibly kill the cgroup. These methods should be added at some point.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm assigning myself as I do intend to do this work, but if someone else works on it, please take the bug or comment on status here.

Changed in systemd-shim (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Serge Hallyn (serge-hallyn)
Martin Pitt (pitti)
Changed in systemd-shim (Ubuntu):
status: Confirmed → Triaged
Changed in systemd-shim (Debian):
status: Unknown → New
Changed in systemd-shim (Ubuntu):
importance: Medium → High
summary: - Implement AbandonScope (etc)
+ [FFE] Implement AbandonScope (etc)
Revision history for this message
Steve Langasek (vorlon) wrote : Re: [FFE] Implement AbandonScope (etc)

I know that the patch for this is not finalized (ongoing discussion with upstream regarding the proper way to implement it), but I'm going to sign off on this FFe on the grounds that this is a discrete new dbus interface that will not impact the rest of the existing code.

(BTW, please avoid marking FFe bugs as 'triaged' as this means they are not in the release team's queue.)

Changed in cgmanager (Ubuntu):
importance: Undecided → High
Revision history for this message
Steve Langasek (vorlon) wrote :

cgmanager also approved as part of this.

Changed in cgmanager (Ubuntu):
status: New → Triaged
Changed in cgmanager (Ubuntu):
status: Triaged → Fix Released
Changed in systemd-shim (Debian):
status: New → Fix Released
Changed in systemd-shim (Debian):
status: Fix Released → New
Revision history for this message
Martin Pitt (pitti) wrote :

This is not Debian bug #756076. That is about cleaning up "closing" loginctl sessions after logging out (which I implemented in upstream git now). But this bug is about actually killing the leftover background processes in the cgroup and the logind session if KillUserProcesses=yes is set in /etc/systemd/logind.conf. (At least how I understand it).

Changed in systemd-shim (Debian):
importance: Unknown → Undecided
no longer affects: systemd-shim (Debian)
summary: - [FFE] Implement AbandonScope (etc)
+ KillUserProcesses=yes does not work under systemd-shim
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.