Repository navigation
Conversation
When an instance failed to launch after its stub had started, for example after missed health updates, the server waited indefinitely for a stub that considered itself initialized, so the model load and server startup hung and the original error was never logged. Wait up to the stub timeout for the stub to exit, then kill it and log a warning.
9 of 22 tasks
[Medium impact] The change appears safe to merge. Summary
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Linux launch fails] --> B[Send existing acknowledgment and release parent resources]
B --> C[Wait up to configured timeout]
C --> D{Stub exited?}
D -->|Yes| E[Return launch error]
D -->|No| F[Log warning]
F --> G[Kill and reap stub]
G --> E
Reviews (1) · Last reviewed commit: "fix: Kill a Python backend stub that out..." · Reviewed by Greptile |
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 does the PR do?
When a model instance fails to launch after its stub process has started, for example after missed health updates during initialization,
StubLauncher::Launch()waited in a blockingwaitpidfor a stub that still considers itself initialized and never exits. The model load hung forever, which also blocks server startup, and the original error was never logged.The cleanup now waits up to
stub-timeout-secondsfor the stub to exit, then kills it and logs a warning. A stub that reports its own initialization error still exits on its own.Checklist
Agreement
<commit_type>: <Title>pre-commit install, pre-commit run --all)Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Where should the reviewer start?
src/stub_launcher.cc: theScopedDeferin the non-WindowsStubLauncher::Launch().Test plan:
init_unresponsivelifecycle test in test: Cover a Python backend stub that stops responding during initialization server#9061. The model stops its own stub duringinitialize()until the server gives up on it.Stub process 'init_unresponsive_0_0' is not healthy., the server exits, and no stub process or shared memory is left.init_errorandadd_subbehave as before.nvcr.io/nvidia/tritonserver:26.04-py3and a CPU-only build of this branch.Caveats:
StubLauncher::Launch()is unchanged.stub-timeout-seconds.Background
On Triton 26.04 (aarch64), Python model loads hung after a server restart and the server never started serving. gdb showed each load thread in
StubLauncher::Launch()→~ScopedDefer→WaitForStubProcess()→waitpid, with the stub processes alive and idle.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)