You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
running container: creating container: cannot set up cgroup for root: configuring cgroup: write /sys/fs/cgroup/cgroup.subtree_control: device or resource busy
The same failure occurs with runsc -network=none do /bin/ls and runsc -rootless -network=none do /bin/ls (rootless mode is what we actually want to use).
My read of cgroup_subtree_control_write -> cgroup_vet_subtree_control_enable in the Linux kernel is that the cgroup must be empty to enable subtrees.
Steps to reproduce
This is easy to reproduce on Go's CI system, but that is a pain to use (you need to upload a pending Go CL and run TryBots).
These CI instances are GCE instances with Container-Optimized OS running a Debian bullseye container. I'm not certain exactly how this container is run (e.g., is docker actually used?), but our instance config can be seen here.
It is possible that this would reproduce inside docker on any cgroup v2 system, but I'm not sure.
When runsc is running inside of an existing container,
writing to /sys/fs/cgroup/cgroup.subtree_control fails with EBUSY
because the cgroup is not empty.
It is likely a more general bug that we fail here, but in rootless mode
cgroups aren't required anyways, so we can workaround the issue by
simply ignoring it in rootless mode.
For google#8111.
Description
On Go's CI instances, runsc fails with:
The same failure occurs with
runsc -network=none do /bin/ls
andrunsc -rootless -network=none do /bin/ls
(rootless mode is what we actually want to use).Rootless mode could likely be made to work by adding EBUSY to https://cs.opensource.google/gvisor/gvisor/+/master:runsc/container/container.go;l=1368;drc=7bb273341ee026d49e144b987b22ef561448bee3. However, it is not clear to me if this is something that can/should be fixed more thoroughly.
I believe we get EBUSY because there are already tasks in the cgroup:
My read of
cgroup_subtree_control_write
->cgroup_vet_subtree_control_enable
in the Linux kernel is that the cgroup must be empty to enable subtrees.Steps to reproduce
This is easy to reproduce on Go's CI system, but that is a pain to use (you need to upload a pending Go CL and run TryBots).
These CI instances are GCE instances with Container-Optimized OS running a Debian bullseye container. I'm not certain exactly how this container is run (e.g., is docker actually used?), but our instance config can be seen here.
It is possible that this would reproduce inside docker on any cgroup v2 system, but I'm not sure.
runsc version
8e6a0b9
docker version (if using docker)
No response
uname
Linux buildlet-linux-amd64-bullseye-rnb7df8bc 5.15.65+ #1 SMP Sat Oct 15 09:12:54 UTC 2022 x86_64 GNU/Linux
kubectl (if using Kubernetes)
No response
repo state (if built from source)
release-20221017.0-4784-g8e6a0b996
runsc debug logs (if available)
The text was updated successfully, but these errors were encountered: