Daemons are restarted in the current session cgroups
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
ProcVersionSign
Uname: Linux 3.13.0-39-generic x86_64
NonfreeKernelMo
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)
Changed in systemd-shim (Debian): | |
status: | Unknown → New |
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.