Uh oh!
There was an error while loading. Please reload this page.
Fix: Remove container directory cleanup on exec process start failures - #1091
Closed
Constantine3 wants to merge 1 commit into
Closed
Fix: Remove container directory cleanup on exec process start failures#1091Constantine3 wants to merge 1 commit into
Constantine3 wants to merge 1 commit into
Conversation
The createProcess() and startProcess() functions were incorrectly cleaning up the container directory when any process (including exec processes) failed to start. Since exec processes share the same container directory as the init process, this caused the container data to be deleted while the container remained in the in-memory list, making it impossible to delete later. Fix: Remove cleanup from createProcess() (exec doesn't use cleanup) and make cleanup in startProcess() conditional - only clean up on init process failures (where id == processID). Resolves#1058
jglogan
commented
Jan 26, 2026
Contributor
@JaewonHur Could you look at this one and see how it relates to your work in #1080? |
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 freeto 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.
When
container execfails (e.g., invalid path), the container directory is deleted but the container remains in the in-memory list. Subsequentcontainer rmfails because theconfig.jsonfile no longer exists.Root cause: The cleanup logic in
createProcess()andstartProcess()didn't distinguish between init process failures and exec process failures.Solution:
createProcess()- if process creation fails, the container directory should remain since no state has been modified.startProcess()conditional using the existingisInitProcess()helper - cleanup only triggers whenid == processID(init process), keeping the container intact on exec process failures.Testing(Manual verification):
fixtest2withrun --name fixtest2 oraclelinux:10 /bin/sleep 1000exec fixtest2 /nonexistent/path- error returnedcontainers/fixtest2/container rm fixtest2succeedsMotivation and Context:
Fixes#1058 - Unable to delete container after exec failure