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
The linked issue is regarding `runsc run --detach=false` not waiting on the
gofer (which is its child process). Because of this, if the container is killed
externally via `runsc delete`, then the gofer process becomes a zombie. There
is a deadlock because `runsc delete` is waiting for the gofer process to be
reaped but the `runsc run` process is stuck waiting for a filesystem lock held
by the `runsc delete` process before it can reap it in Container.Destroy().
The fix is to also attempt reaping the child gofer process in Container.Wait().
Notice that this is similar to what Sandbox does. Both Sandbox.Wait() and
Sandbox.destroy() call Sandbox.waitForStopped() which reaps the child sandbox
process. However, only Container.Destroy() => stop() => waitForStopped(). This
change updates Container.Wait() to start a goroutine that waits on the gofer
PID in the background when the gofer process is a child of the caller.
This fixes the above deadlock because `runsc run` will reap the gofer before
getting stuck waiting for the filesystem lock.
Fixes#12051
PiperOrigin-RevId: 805669277
0 commit comments