Daemons are restarted in the current session cgroups

Bug #1392642 reported by Matteo Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysvinit (Debian)
New
Unknown
sysvinit (Ubuntu)
New
Undecided
Unassigned

Bug Description

(forwarded from the relevant bug report raised in Debian BTS and adapted for upstart as PID1)

Daemons which are not spawned via an upstart job (eg. those with initscripts, ifupdown hooks and similar) are not detached from the current logind session cgroups. This causes the session to linger in the closing state until the background processes are either terminated or manually moved by root into the root cgroups, so seat ACLs are not released.

A (very crude) workaround on Debian Jessie is using cgm movepidabs / $$ to "break out" of the current session before performing any administrative action which could result in a daemon (re)start, but cgmanager is not installed by default on Trusty and the version of cgm shipped with it lacks the movepidabs subcommand (even though the MovePidAbs method in the DBus interface does exist).

Note that this affects anything that uses service, invoke-rc.d, ifupdown hooks (like ifup on PPPoE links) or initscripts directly. Upstart jobs are not affected because they inherit their cgroup set from PID1 (which lives in the root cgroup).

Nota bene: I'm raising the issue on systemd-shim on advice from its maintainer, even though it's unclear at what level this behavior should be addressed.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: systemd-shim 6-2bzr1
ProcVersionSignature: Ubuntu 3.13.0-39.66-generic 3.13.11.8
Uname: Linux 3.13.0-39-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
Date: Fri Nov 14 10:36:01 2014
InstallationDate: Installed on 2012-09-30 (774 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120823.1)
SourcePackage: systemd-shim
UpgradeStatus: Upgraded to trusty on 2014-08-18 (87 days ago)

Revision history for this message
Matteo Panella (mpanella) wrote :
Changed in systemd-shim (Debian):
status: Unknown → New
Revision history for this message
Matteo Panella (mpanella) wrote :

Reassigning to sysvinit to keep it in sync with the upstream issue.
Also, it makes more sense given that changes should happen in files shipped by sysvinit-utils and sysv-rc.

affects: systemd-shim (Debian) → sysvinit (Debian)
affects: systemd-shim (Ubuntu) → sysvinit (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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