Skip to content

Fix crash and resource-leak bugs in the containerd shim - #14439

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test/cl971554443
Aug 27, 2026
Merged

Fix crash and resource-leak bugs in the containerd shim#14439
copybara-service[bot] merged 2 commits into
masterfrom
test/cl971554443

Conversation

@copybara-service

Copy link
Copy Markdown

Fix crash and resource-leak bugs in the containerd shim

  • runsc/debug.go: the SIGUSR2 stack dumper never exited its loop, so one signal pinned a core for the life of the shim.
  • proc/init_state.go: the start-failure path closed p.io unconditionally, but Init.Create leaves it nil for terminal containers. The nil deref killed the shim, and with it the pod.
  • proc/utils.go: getLastRuntimeError leaked the log file it opened, on every failed runsc command.
  • utils/volumes.go: configureShm wrote into a nil annotation map, which IsSandbox permits.
  • runsc/epoll.go: the cgroups v1 OOM watcher panicked on the first publish failure, which is normal under CRI-O. Reuse forward's leniency check; the panic under containerd is kept.
  • runsccmd/runsc.go: cmdOutput returned slices aliasing sync.Pool buffers that putBuf immediately recycled.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14422 from milantracy:shim 4b9e98b

- runsc/debug.go: the SIGUSR2 stack dumper never exited its loop, so one
signal pinned a core for the life of the shim.
- proc/init_state.go: the start-failure path closed p.io unconditionally,
but Init.Create leaves it nil for terminal containers. The nil deref
killed the shim, and with it the pod.
- proc/utils.go: getLastRuntimeError leaked the log file it opened, on
every failed runsc command.
- utils/volumes.go: configureShm wrote into a nil annotation map, which
IsSandbox permits.
- runsc/epoll.go: the cgroups v1 OOM watcher panicked on the first
publish failure, which is normal under CRI-O. Reuse forward's leniency
check; the panic under containerd is kept.
- runsccmd/runsc.go: cmdOutput returned slices aliasing sync.Pool buffers
that putBuf immediately recycled.
@copybara-service copybara-service Bot added the exported Issue was exported automatically label Aug 26, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl971554443 branch 4 times, most recently from ddc1ce4 to e7392c6 Compare August 27, 2026 05:26
PiperOrigin-RevId: 971739193
@copybara-service
copybara-service Bot merged commit 70f526f into master Aug 27, 2026
5 of 7 checks passed
@copybara-service
copybara-service Bot deleted the test/cl971554443 branch August 27, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants