I get a similar `cgcreate` error using cgroups 3.1 (copied from
oracular).
I installed cgroups 3.1 (from oracular) on Ubuntu 24.04.02:
# dpkg -i libcgroup3_3.1.0-2_amd64.deb cgroup-
tools_3.1.0-2_amd64.deb
I ran the same `cgcreate` test as I did with cgroups 2.0 above and it
failed:
$ systemd-run --scope --user --shell --property=Delegate=true
Running as unit: run-r16775b7d539b478ab6b2840a3d2ca5d5.scope; invocation
ID: 243da47e15e141f6bc888a9a39b2c790
$ cgcreate -g
pids:user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo
Error: Failed to delete
user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo:
No such file or directory
cgcreate: can't create cgroup
user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo:
Cgroup, requested group parameter does not exist
The `Failed to delete` message is new with cgroups 3.1 and seems to be
spurious. It should not be an error to create a cgroup that does not
already exist!
I can use an unprivileged `mkdir` to create the new `foo` cgroup without
any error:
$ mkdir
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo
$ ls -l
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo
total 0
-r--r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.controllers
-r--r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.events
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.freeze
--w------- 1 idallen idallen 0 Feb 28 19:52 cgroup.kill
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.max.depth
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.max.descendants
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.pressure
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.procs
-r--r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.stat
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.subtree_control
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.threads
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cgroup.type
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 cpu.pressure
-r--r--r-- 1 idallen idallen 0 Feb 28 19:52 cpu.stat
-r--r--r-- 1 idallen idallen 0 Feb 28 19:52 cpu.stat.local
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 io.pressure
-rw-r--r-- 1 idallen idallen 0 Feb 28 19:52 memory.pressure
And now when I use `cgcreate`, with the existing `foo` I just created,
`cgcreate` deletes the `foo` I just created (no error message about
`Failed to delete`) and fails to re-create it:
$ cgcreate -g
pids:user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo
cgcreate: can't create cgroup
user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo:
Cgroup, requested group parameter does not exist
$ ls -l
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo
ls: cannot access
'/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/run-r16775b7d539b478ab6b2840a3d2ca5d5.scope/foo':
No such file or directory
The `foo` I created with `mkdir` was deleted by `cgcreate`, and then
`cgcreate` fails to re-create it.
This is using cgroups 3.1 copied from ubuntu oracular:
https://bugs.launchpad.net/ubuntu/oracular/amd64/libcgroup3/3.1.0-2
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2099883
Title:
cgroups V2: unprivileged cgcreate fails with nsdelegate mount
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libcgroup/+bug/2099883/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs