<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Some cgroups cleared of processes on daemon-reload."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89022">89022</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Some cgroups cleared of processes on daemon-reload.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>xstill@fi.muni.cz
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1139223">https://bugzilla.redhat.com/show_bug.cgi?id=1139223</a> 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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>