[systemd-devel] [PATCH] cgroup: Handle error when destroying cgroup
Lennart Poettering
lennart at poettering.net
Mon Dec 8 17:33:03 PST 2014
On Sat, 29.11.14 15:27, Ross Lagerwall (rosslagerwall at gmail.com) wrote:
> If a cgroup fails to be destroyed (most likely because there are still
> processes running as part of a service after the main pid exits), don't
> free and remove the cgroup unit from the manager. This fixes a
> regression introduced by the cgroup rework in v205 where systemd would
> forget about processes still running after the unit becomes inactive.
> (This can happen when the main pid exits and KillMode=process or none).
> ---
>
> Not sure if this is the correct fix but it seems to fix the issue I reported.
> When the issue occurs, this notice is visible in the logs:
> Nov 28 22:11:32 centi7 systemd[1]: Failed to destroy cgroup /system.slice/tester.service: Device or resource busy
Patch looks great actually. Applied! Thanks for tracking this down and
prepping a patch.
After applying it I renamed the unit_destroy_cgroup() call to
unit_destroy_cgroup_if_empty() since it is now much less destructive
than it used to be.
Thanks,
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list