Repository navigation
Conversation
ManagedInterpreterGroup assigned the process handle before start(), so a launch rejected (e.g. by a k8s namespace quota) left a handle that never ran and every later paragraph failed with 'Interpreter process is not running' until a full interpreter restart. On start()/init() failure, stop the half-created process, drop the handle and rethrow.
zeotuan
marked this pull request as ready for review
October 21, 2026 04:11
This branch has not been deployed
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.
What is this PR for?
ManagedInterpreterGroup.getOrCreateInterpreterProcessassigns the process handle beforestart(). When a launch fails (e.g. an interpreter pod rejected by a k8s namespace quota), the group keeps a handle that never ran, so every later paragraph fails with:until a full interpreter restart.
Change:
start()/init()failure: stop the half-created process (cleans up orphan resources such as the scratch PVC and Service), drop the handle, rethrow.Out of scope: a process that dies after a successful start (e.g. OOM-killed driver) still needs a restart.
Related: #5517 (open) leaves this case out of scope ("after a launch fails, the group keeps the failed process until the interpreter is restarted"). This PR covers it. The two are complementary: with #5517, the
stop()here also ends a launch that is still in progress.What type of PR is it?
Bug Fix
Todos
What is the Jira issue?
How should this be tested?
ManagedInterpreterGroupTest.failedLaunchIsDiscardedSoTheNextRunLaunchesAgain(fails on unpatched source).Screenshots (if appropriate)
N/A
Questions: