Skip to content
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

not ok 42 runc delete: cgroup not cleaned up correctly #3391

Closed
kolyshkin opened this issue Feb 22, 2022 · 1 comment · Fixed by #3392
Closed

not ok 42 runc delete: cgroup not cleaned up correctly #3391

kolyshkin opened this issue Feb 22, 2022 · 1 comment · Fixed by #3392

Comments

@kolyshkin
Copy link
Contributor

This is an interesting failure I haven't seen before. Happened in centos-stream-8 CI here: https://cirrus-ci.com/task/6376444287778816?logs=integration_systemd#L49

not ok 42 runc delete
# (from function `fail' in file tests/integration/helpers.bash, line 338,
#  in test file tests/integration/delete.bats, line 30)
#   `[ "$output" = "" ] || fail "cgroup not cleaned up correctly: $output"' failed
# runc spec (status=0):
# 
# runc run -d --console-socket /tmp/bats-run-68012/runc.IPOypI/tty/sock testbusyboxdelete (status=0):
# 
# runc state testbusyboxdelete (status=0):
# {
#   "ociVersion": "1.0.2-dev",
#   "id": "testbusyboxdelete",
#   "pid": 71979,
#   "status": "running",
#   "bundle": "/tmp/bats-run-68012/runc.IPOypI/bundle",
#   "rootfs": "/tmp/bats-run-68012/runc.IPOypI/bundle/rootfs",
#   "created": "2022-02-19T00:12:45.413050609Z",
#   "owner": ""
# }
# runc kill testbusyboxdelete KILL (status=0):
# 
# runc delete testbusyboxdelete (status=0):
# 
# runc state testbusyboxdelete (status=1):
# time="2022-02-19T00:12:45Z" level=error msg="container does not exist"
# cgroup not cleaned up correctly: /sys/fs/cgroup/pids/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
# /sys/fs/cgroup/cpu,cpuacct/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
# /sys/fs/cgroup/blkio/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
# /sys/fs/cgroup/devices/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
# /sys/fs/cgroup/memory/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
# /sys/fs/cgroup/systemd/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
@kolyshkin
Copy link
Contributor Author

Ah, OK, this seems like a cgroup created by systemd for the temporary mount unit, created by systemd as a result of runc doing the self bind-mount. Obviously, the test should not take this cgroup into account. IOW it's a flake, and the fix is something like:

diff --git a/tests/integration/delete.bats b/tests/integration/delete.bats
index ea8a3bb6..42253fd3 100644
--- a/tests/integration/delete.bats
+++ b/tests/integration/delete.bats
@@ -26,7 +26,7 @@ function teardown() {
        runc state testbusyboxdelete
        [ "$status" -ne 0 ]
 
-       output=$(find /sys/fs/cgroup -wholename '*testbusyboxdelete*' -type d)
+       output=$(find /sys/fs/cgroup -wholename '*testbusyboxdelete*' -type d | grep -v 'mount$')
        [ "$output" = "" ] || fail "cgroup not cleaned up correctly: $output"
 }
 

Yet, this is another reminder that we should try to implement something that avoids that mount entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant