cgroup-bin doesn't unmount /sys/fs/cgroup when stopping
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libcgroup (Ubuntu) |
Fix Released
|
Low
|
Serge Hallyn |
Bug Description
When starting the cgconfig upstart job, a tmpfs is mounted over /sys/fs/cgroup.
When stopping the same job, all the cgroup fs get unmounted but not the tmpfs.
The problem can easily be seen with the following example:
root@castiana:~# cat /proc/mounts | grep cgroup | grep tmpfs
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
root@castiana:~# for i in $(seq 1 10); do restart cgconfig; done
cgconfig start/running
cgconfig start/running
cgconfig start/running
cgconfig start/running
cgconfig start/running
cgconfig start/running
cgconfig start/running
cgconfig start/running
cgconfig start/running
cgconfig start/running
root@castiana:~# cat /proc/mounts | grep cgroup | grep tmpfs
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
cgroups /sys/fs/cgroup tmpfs rw,relatime 0 0
Oops, the umount of /sys/fs/cgroup should be done after calling cgclear,
not before.