Skip to content

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

Merged
copybara-service[bot] merged 1 commit into
google:masterfrom
milantracy:shim
Aug 27, 2026
Merged

Fix crash and resource-leak bugs in the containerd shim#14422
copybara-service[bot] merged 1 commit into
google:masterfrom
milantracy:shim

Conversation

@milantracy

Copy link
Copy Markdown
Collaborator
  • 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.

Comment thread pkg/shim/v1/runsc/epoll.go Outdated
Comment thread pkg/shim/v1/runsc/service.go Outdated
- 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 Bot pushed a commit that referenced this pull request Aug 27, 2026
- 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
PiperOrigin-RevId: 971554443
copybara-service Bot pushed a commit that referenced this pull request Aug 27, 2026
- 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
PiperOrigin-RevId: 971554443
copybara-service Bot pushed a commit that referenced this pull request Aug 27, 2026
- 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
PiperOrigin-RevId: 971554443
copybara-service Bot pushed a commit that referenced this pull request Aug 27, 2026
- 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
PiperOrigin-RevId: 971554443
@copybara-service
copybara-service Bot merged commit 70f526f into google:master Aug 27, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants