-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cgroupv2 fs driver does not work with default cgroups path #2298
Comments
@AkihiroSuda do you have any idea why is that? |
Another repro, fresh boot, older kernel. [kir@f31-test ~]$ uname -a
Linux f31-test 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[kir@f31-test ~]$ sudo -s
[sudo] password for kir:
[root@f31-test kir]# cat /proc/self/cgroup
0::/user.slice/user-1000.slice/session-2.scope
[root@f31-test kir]# cd /sys/fs/cgroup//user.slice/user-1000.slice/session-2.scope
[root@f31-test session-2.scope]# cat cgroup.controllers
memory pids
[root@f31-test session-2.scope]# echo +memory > cgroup.subtree_control
bash: echo: write error: Device or resource busy
[root@f31-test session-2.scope]# tail cgroup.*
==> cgroup.controllers <==
memory pids
==> cgroup.events <==
populated 1
frozen 0
==> cgroup.freeze <==
0
==> cgroup.max.depth <==
max
==> cgroup.max.descendants <==
max
==> cgroup.procs <==
1528
1552
1559
1599
1603
1677
==> cgroup.stat <==
nr_descendants 0
nr_dying_descendants 0
==> cgroup.subtree_control <==
==> cgroup.threads <==
1528
1552
1559
1599
1603
1677
==> cgroup.type <==
domain |
I suspect this have to do with systemd, but don't understand how (and so, how to fix it). |
This has been partially addressed by the last commit in #2299, but the issue is still there. |
OK, the reason for from /*
* Controllers can't be enabled for a cgroup with tasks to avoid
* child cgroups competing against tasks.
*/
if (cgroup_has_tasks(cgrp))
return -EBUSY; The reason for The fix is coming. |
When the cgroupv2 fs driver is used without setting cgroupsPath, it picks up a path from /proc/self/cgroup. On a host with systemd, such a path can look like (examples from my machines): - /user.slice/user-1000.slice/session-4.scope - /user.slice/user-1000.slice/[email protected]/gnome-launched-xfce4-terminal.desktop-4260.scope - /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service This cgroup already contains processes in it, which prevents to enable controllers for a sub-cgroup (writing to cgroup.subtree_control fails with EBUSY or EOPNOTSUPP). Obviously, a parent cgroup (which does not contain tasks) should be used. Fixes opencontainers/issues/2298 Signed-off-by: Kir Kolyshkin <[email protected]>
When the cgroupv2 fs driver is used without setting cgroupsPath, it picks up a path from /proc/self/cgroup. On a host with systemd, such a path can look like (examples from my machines): - /user.slice/user-1000.slice/session-4.scope - /user.slice/user-1000.slice/[email protected]/gnome-launched-xfce4-terminal.desktop-4260.scope - /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service This cgroup already contains processes in it, which prevents to enable controllers for a sub-cgroup (writing to cgroup.subtree_control fails with EBUSY or EOPNOTSUPP). Obviously, a parent cgroup (which does not contain tasks) should be used. Fixes opencontainers/issues/2298 Signed-off-by: Kir Kolyshkin <[email protected]>
When the cgroupv2 fs driver is used without setting cgroupsPath, it picks up a path from /proc/self/cgroup. On a host with systemd, such a path can look like (examples from my machines): - /user.slice/user-1000.slice/session-4.scope - /user.slice/user-1000.slice/[email protected]/gnome-launched-xfce4-terminal.desktop-4260.scope - /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service This cgroup already contains processes in it, which prevents to enable controllers for a sub-cgroup (writing to cgroup.subtree_control fails with EBUSY or EOPNOTSUPP). Obviously, a parent cgroup (which does not contain tasks) should be used. Fixes opencontainers/runc/issues/2298 Signed-off-by: Kir Kolyshkin <[email protected]>
When the cgroupv2 fs driver is used without setting cgroupsPath, it picks up a path from /proc/self/cgroup. On a host with systemd, such a path can look like (examples from my machines): - /user.slice/user-1000.slice/session-4.scope - /user.slice/user-1000.slice/[email protected]/gnome-launched-xfce4-terminal.desktop-4260.scope - /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service This cgroup already contains processes in it, which prevents to enable controllers for a sub-cgroup (writing to cgroup.subtree_control fails with EBUSY or EOPNOTSUPP). Obviously, a parent cgroup (which does not contain tasks) should be used. Fixes opencontainers/runc/issues/2298 Signed-off-by: Kir Kolyshkin <[email protected]>
When the cgroupv2 fs driver is used without setting cgroupsPath, it picks up a path from /proc/self/cgroup. On a host with systemd, such a path can look like (examples from my machines): - /user.slice/user-1000.slice/session-4.scope - /user.slice/user-1000.slice/[email protected]/gnome-launched-xfce4-terminal.desktop-4260.scope - /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service This cgroup already contains processes in it, which prevents to enable controllers for a sub-cgroup (writing to cgroup.subtree_control fails with EBUSY or EOPNOTSUPP). Obviously, a parent cgroup (which does not contain tasks) should be used. Fixes opencontainers/runc/issues/2298 Signed-off-by: Kir Kolyshkin <[email protected]>
When the cgroupv2 fs driver is used without setting cgroupsPath, it picks up a path from /proc/self/cgroup. On a host with systemd, such a path can look like (examples from my machines): - /user.slice/user-1000.slice/session-4.scope - /user.slice/user-1000.slice/[email protected]/gnome-launched-xfce4-terminal.desktop-4260.scope - /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service This cgroup already contains processes in it, which prevents to enable controllers for a sub-cgroup (writing to cgroup.subtree_control fails with EBUSY or EOPNOTSUPP). Obviously, a parent cgroup (which does not contain tasks) should be used. Fixes opencontainers/runc/issues/2298 Signed-off-by: Kir Kolyshkin <[email protected]>
When the cgroupv2 fs driver is used without setting
cgroupsPath
, it picks up a path from/proc/self/cgroup
. On a host with systemd, such path looks like/user.slice/user-1000.slice/session-4.scope
.It fails to enable controllers for sub-cgroup. The error from the kernel is either
EBUSY
orEOPNOTSUPP
. It has probably something to do with systemd, but I'm not sure.Here's the error (with more debug added):
Here's the same thing, reproduced manually from a shell:
The text was updated successfully, but these errors were encountered: