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
{{ message }}
Repository navigation
Orphaned shim state files in /run/containerd/runc are not cleaned up after shim is SIGKILLed #13293
I am currently running containerd v2.2.3. I have observed that if a containerd-shim-runc-v2 process is forcefully terminated via kill -9 (SIGKILL) — simulating an unexpected crash or manual intervention — the shim naturally cannot execute its graceful shutdown routine. As a result, container state files and directories indefinitely linger in /run/containerd/runc/k8s.io//.
It is worth noting that this issue does not occur in containerd v1.7.5, which clearly indicates a regression.
Steps to reproduce the issue
Create a test Pod
kubectl apply -f test.yaml
POD_ID=$(crictl pods --name test -q)
Record initial state countCheck how many state directories exist before the crash
Observe the Leak (The "wc -l" test)Wait a few seconds for containerd to process the exit, then check the count again.bash
ls /run/containerd/runc/k8s.io/ | wc -l
Describe the results you received and expected
In version v1.7.5, old container directories are properly cleaned up. As a result, the total number of container directories remains unchanged after operations.
In version v2.2.2, old container directories are not cleaned up. Each operation leaves the previous directory behind, causing the directory count to increase by 1 every time.
This leads to an accumulation of unnecessary directories in v2.2.3, whereas v1.7.2 keeps the environment tidy.
Activity
ningmingxiao commentedon Apr 28, 2026
I will try to fix it. @wtootw
ningmingxiao commentedon Apr 28, 2026
try pr #13309 @wtootw