Repository navigation
shim: report sandbox exits before successful start - #17634
Open
dimko-at-bunny wants to merge 1 commit into
Open
dimko-at-bunny wants to merge 1 commit into
dimko-at-bunny wants to merge 1 commit into
Conversation
A root sandbox already exists after Create, but the shim only starts its normal waiter after a successful Start. If Start fails or is never called, host death can leave Wait and containerd force-delete without completion. Transfer a creator-owned pidfd to the shim and observe it until Start or Restore succeeds. Preserve the normal guest waiter, OOM event ordering and delete completion across retries. Clean up a root when post-create observer setup fails. The standalone-root classification prerequisite also appears in google#17519. Assisted-by: Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A root sandbox already exists after
Create, but the shim only starts waiting for its exit after a successfulStart. If the sandbox dies before that transition,Waitnever completes and containerd force-delete can hang.Track that process using a pidfd passed by its creator. After a successful
StartorRestore, keep using the existing runsc waiter and guest exit status.Changes
Tested
The standalone-root classification hunk overlaps #17519; that PR handles the separate startup-delay and stdio bug.
Validation revisions and startup measurements
Component tests:
ac451b2. Native and workload checks:5b4c2ee, combining this change with the separate process-name/Unlock follow-up, on baseddb2d202.Annotated-root startup measurements used
4d7dc1d, before the final rollback correction:The initial small difference was not reproduced in the randomized control. These results do not establish zero overhead.