Repository navigation
fix: prevent stranded prefill requests after subprocess failure - #239
Draft
gspark-etri wants to merge 1 commit into
Draft
gspark-etri wants to merge 1 commit into
gspark-etri wants to merge 1 commit into
Conversation
This was referenced Oct 23, 2026
gspark-etri
added a commit
that referenced
this pull request
Oct 30, 2026
…#246, #249) (#282) From feat/249-pd-stage-metrics (#239, #247, #250): SubprocessPrefillWorker failure settling, producer readiness gating /ready and admission, producer stage-duration metrics; only the /ready hunk of llmd.py. Fixes on top: - SubprocessPrefillWorker.close() closes stdin and waits for a clean exit before SIGTERM, then SIGKILL (prefill_server exits on stdin EOF; SIGTERM first skipped SDK cleanup that releases the device). - ProcessPrefillWorker.ready: a dead child now fails readiness and admission is rejected with 503 instead of quarantining the batcher. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Background
A cancelled prefill Future, JSON-formatted SDK log or malformed reply can terminate the subprocess receiver and strand later serving requests. Startup failure can leave shared memory or a child process behind.
Changes
Verification
Baseline
df02223: the nine new scenarios fail (three receiver-thread warnings and one cleanup error). Candidate: 64 focused PD/ATOM/serving tests pass, including actual tiny Torch subprocess prefill. Final full suite: 460 passed, 15 skipped, 135 subtests passed, one existing flex_attention warning (134.34 s). Test-file Ruff andgit diff --checkpass.Commands and outcomes are in
opt_prime/examples/pd/http_matrix/experiments/2026-10-23-prefill-worker-failure238.md.Compatibility and limits
Stacked on #237. CPU process lifecycle evidence only: no accelerator reset, automatic request replay/restart or throughput claim. The four-model live hardware queue remains on its pinned implementation under #234; this change is not silently injected into that running experiment.
The repository-wide sensitive scan has four unchanged baseline findings; the files introduced/changed by this PR are checked separately before push.
Related Issue
Closes #238