[systemd-bugs] [Bug 89022] New: Some cgroups cleared of processes on daemon-reload.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Feb 7 09:13:14 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89022

            Bug ID: 89022
           Summary: Some cgroups cleared of processes on daemon-reload.
           Product: systemd
           Version: unspecified
          Hardware: All
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: systemd-bugs at lists.freedesktop.org
          Reporter: xstill at fi.muni.cz
        QA Contact: systemd-bugs at lists.freedesktop.org

Hi,

When I create cgroups using filesystem interface and add some processes into
them, and later do 'systemctl daemon-reload' and 'systemctl start
multi-user.target', in some hierarchies processes are moved from those cgroups,
while in other processes stay (no cgroups are deleted though).

Here is a way to reproduce this behavior:

# systemctl --version
systemd 217
+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP -LIBCRYPTSETUP
+GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN 
# mkdir /sys/fs/cgroup/{blkio,cpu,cpuset,devices,freezer,memory,net_cls}/group
# echo 0-3 > /sys/fs/cgroup/cpuset/group/cpuset.cpus 
# echo 0 > /sys/fs/cgroup/cpuset/group/cpuset.mems
# echo $$ | tee
/sys/fs/cgroup/{blkio,cpu,cpuset,devices,freezer,memory,net_cls}/group/tasks
19823
# for t in
/sys/fs/cgroup/{blkio,cpu,cpuset,devices,freezer,memory,net_cls}/group/tasks;
do echo $t; cat $t; done
/sys/fs/cgroup/blkio/group/tasks
19823
20019
/sys/fs/cgroup/cpu/group/tasks
19823
20020
/sys/fs/cgroup/cpuset/group/tasks
19823
20021
/sys/fs/cgroup/devices/group/tasks
19823
20022
/sys/fs/cgroup/freezer/group/tasks
19823
20023
/sys/fs/cgroup/memory/group/tasks
19823
20024
/sys/fs/cgroup/net_cls/group/tasks
19823
20025
# systemctl daemon-reload 
# systemctl start multi-user.target
# for t in
/sys/fs/cgroup/{blkio,cpu,cpuset,devices,freezer,memory,net_cls}/group/tasks;
do echo $t; cat $t; done
/sys/fs/cgroup/blkio/group/tasks
/sys/fs/cgroup/cpu/group/tasks
/sys/fs/cgroup/cpuset/group/tasks
19823
20041
/sys/fs/cgroup/devices/group/tasks
/sys/fs/cgroup/freezer/group/tasks
19823
20043
/sys/fs/cgroup/memory/group/tasks
/sys/fs/cgroup/net_cls/group/tasks
19823
20045



I have read some bug reports regarding cg_trim behavior, especially
https://bugzilla.redhat.com/show_bug.cgi?id=1139223 which might be related, but
the difference is that
1) cgroups are not deleted, processes are just moved away from them
2) in this case cgroups are created manually
3) different hierarchies behave differently

This is big problem when using cgroups to limit user resources, not resources
of systemd units.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150207/88f3a86f/attachment.html>


More information about the systemd-bugs mailing list