From 8d564a71c09547a1ef7121b5386fd77abe17ccea Mon Sep 17 00:00:00 2001 From: Cyrill Troxler Date: Sun, 28 Jun 2026 13:28:39 +0200 Subject: [PATCH] fix: cleanup on checkpoint process exit When skipping to notify the exit channel we should still cleanup some of the maps the container service uses to keep track of running/exec containers. --- shim/task/service_zeropod.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/shim/task/service_zeropod.go b/shim/task/service_zeropod.go index 0278ddd..fb4f43b 100644 --- a/shim/task/service_zeropod.go +++ b/shim/task/service_zeropod.go @@ -413,10 +413,19 @@ func (w *wrapper) processExits() { preventExit = true } } - if !preventExit { - // pass event to service exit channel - w.service.ec <- e + if preventExit { + // cleanup running and exec maps + w.lifecycleMu.Lock() + delete(w.running, e.Pid) + for _, cp := range cps { + delete(w.execCountSubscribers, cp.Container) + delete(w.runningExecs, cp.Container) + } + w.lifecycleMu.Unlock() + continue } + // pass event to service exit channel + w.service.ec <- e } }