Skip to content

fix: gate serving readiness and admission on PD producer availability - #247

Closed
gspark-etri wants to merge 1 commit into
exp/240-gpu-live-pdfrom
fix/246-pd-producer-readiness
Closed

gspark-etri wants to merge 1 commit into
exp/240-gpu-live-pdfrom
fix/246-pd-producer-readiness

Conversation

@gspark-etri

Copy link
Copy Markdown
Collaborator

Background

After its required subprocess producer died, batched serving still returned /ready200/ready=true and admitted completions that returned500/non-retryable. A real tiny Torch subprocess/HTTP reproduction confirms this on ea09aca.

Changes

Expose subprocess readiness and propagate it through configured worker pools. Use that availability consistently in batched readiness and request admission: terminally unavailable producers now return retryable503 before scheduling. Explicit healthy replacement restores readiness; a single request error does not poison a live producer. No implicit rerouting, replay or automatic restart.

Verification

  • Real subprocess and HTTP regression:3failed/1passed on baseline; final4passed. Covers child termination, closed worker, failed pool member, explicit replacement with correct output, and per-request failure while remaining ready.
  • Focused serving/PD suite30passed; full project468passed,15skipped,135subtests passed; one existing flex_attention warning (151.40s).
  • Independent before/after probe: readiness200->503 and new completion500/non-retryable->503/retryable after known worker death. JSON/commands are in http_matrix/evidence246 and the producer-readiness246 experiment record.
  • Ruff for the new tests, diff check and scoped sensitive scan pass.

Compatibility and limits

Stacked on #243. Non-PD services and legacy/custom workers without the optional readiness property retain prior behavior. Pools conservatively require all configured members because routing still includes them. Already-admitted work retains its existing drain/error handling; the decoder is not quarantined solely because a producer can be replaced.

This is real CPU subprocess/HTTP evidence. Historical hardware fault evidence #244/#245 is pinned to its previous later-request500 behavior; the corrected admission contract is503. The change does not add automatic production restart or establish performance/overlap benefits.

Related Issue

Closes #246; follows #238/#239 and #244/#245.

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>
@gspark-etri

Copy link
Copy Markdown
Collaborator Author

Landed on optimus-rm via #282. Closing; the branch is archived locally (experiment records and evidence included).

@gspark-etri gspark-etri closed this Nov 3, 2026
@gspark-etri
gspark-etri deleted the fix/246-pd-producer-readiness branch November 3, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant