Skip to content

[https://nvbugs/6312828][fix] Recover disaggregated requests after timeouts - #16402

Draft
chienchunhung wants to merge 9 commits into
NVIDIA:mainfrom
chienchunhung:codex/nvbug6312828-proxy-deadline
Draft

[https://nvbugs/6312828][fix] Recover disaggregated requests after timeouts#16402
chienchunhung wants to merge 9 commits into
NVIDIA:mainfrom
chienchunhung:codex/nvbug6312828-proxy-deadline

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes NVBug 6312828, where high-concurrency disaggregated Qwen3-32B requests could become terminal at the HTTP layer while backend KV-transfer work remained stranded, preventing the cluster from recovering.

This PR makes timeout and cancellation outcomes terminal and client-visible, keeps asynchronous CTX transfers progressing and reaped, and rejects stale or replayed C++ handshakes. In-flight transfer cancellation remains disabled by default, and kv_transfer_admission_window_multiplier remains 1.

Fix Scope

  • Apply one request deadline across routing, CTX/GEN dispatch, retries, and response streaming.
  • Return HTTP 504 before response headers; after SSE begins, emit an in-band timeout error followed by [DONE].
  • Do not retry expired deadlines or upstream HTTP 504 responses. Preserve only retries that are safe before GEN connection establishment.
  • Make coordinator accounting, reservations, sibling tasks, upstream streams, shutdown, and request cleanup cancellation-safe and bounded.
  • Terminalize queued requests before removing executor bookkeeping.
  • Keep an otherwise-idle CTX executor polling while any rank owns asynchronous KV-transfer work, and defer drain-required control operations until ownership is released on every rank.
  • Make default-off C++ cancellation phase-safe:
    • cancellation wins before any peer publishes a transfer session;
    • after the first peer arrives, the request drains naturally;
    • GEN cancellation remains observe-only until C++ reports a rank-consistent terminal result.
  • Reject late or replayed handshakes with ready=false.
  • Bound pending pre-handshake cancellation state to 65,536 entries. Entries have at least 30 seconds of retention and are reclaimed under capacity pressure into separately bounded finalized-handshake history, preserving late-peer rejection without unbounded growth.
  • Preserve the full Qwen3-32B stress workload: 10,000 requests, concurrency 512, a 180-second request deadline, 5-second heartbeat, and 10-second inactivity timeout.

Scope boundaries:

  • C++ in-flight transfer cancellation remains disabled by default; permanently wedged active transport operations are not claimed resolved.
  • The Python V2 transceiver cancellation protocol is unchanged.
  • Admission-window tuning is separate work.
  • B200 DeepSeek under NVBug 6472256 and H100 Qwen3.5 under NVBug 6479324 remain excluded from this PR's resolution claim.

Review Guide

Suggested review order:

  1. HTTP deadline and cleanup: openai_client.py, openai_disagg_server.py, openai_disagg_service.py, and disagg_coordinator.py.
  2. Executor terminalization and transfer reaping: py_executor.py, request_utils.py, waiting_queue.py, and kv_cache_transceiver.py.
  3. C++ cancellation and replay handling: cacheTransceiver.cpp, dataTransceiver.cpp, and the agent connection helpers.
  4. Regression coverage: focused Python/C++ unit tests and the disaggregated stress harness.

The diff is test-heavy: approximately 3.8k added test lines versus 1.6k added production lines.

Validation

Current head: 3c7358cf3197

Both NVBug 6312828 Qwen3-32B hardware variants passed previously on production-code ancestor fca8e33571. Because this head adds the bounded cancellation-state fix and removes the remaining B200 waiver, fresh-head B200 and H100 runs are in progress before final verification is claimed.

Workload Scope Validation Waiver after this PR
B200 test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress] — 10,000 requests Original NVBug 6312828 scenario; later re-waived under NVBug 6472256 Historical pass: helper #60877 / QA #311. Fresh-head run requested. Unwaived
H100 test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress] — 10,000 requests NVBug 6312828 hardware counterpart Historical pass: helper #60878 / QA #312. Fresh-head mirror run requested. Unwaived
B200 test_disaggregated_stress_test[input8k-output1k-conc512-deepseek_r1_v2_fp4_stress] — 35,000 requests Separate NVBug 6472256 workload Not verified or claimed resolved here. Remains waived
H100 test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_5_4b_fp8_stress] — 3,000 requests Separate NVBug 6479324 workload Blocked by a hybrid-cache datatype defect. PR #16505 contains the corresponding generic dtype fix, but this exact workload has not been verified or unwaived here. Remains waived

Static validation on 3c7358cf3197 passes, including clang-format, Ruff, codespell, DCO, waiver/test-list validation, and the full pre-commit diff checks. Two independent self-review passes found no remaining actionable P0/P1/P2 issue. The new MPI/CUDA C++ race tests require the hardware CI environment and could not be executed locally.

Fresh-head targeted QA and full pre-merge CI results will be added here when complete.

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --only-qa-verify test disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress]

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59370 [ run ] triggered by Bot. Commit: fb8b982 Link to invocation

yufeiwu-nv added a commit to yufeiwu-nv/TensorRT-LLM that referenced this pull request Jul 15, 2026
…16402)

This update ensures that commented-out lines in the Groovy configuration are ignored during stage parsing, preventing disabled stage configurations from being processed.

Signed-off-by: yufeiwu-nv <230315618+yufeiwu-nv@users.noreply.github.com>
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59370 [ run ] completed with state FAILURE. Commit: fb8b982
LLM_FUNCTION_AUTO_V2C #262 completed with status: 'UNSTABLE'
QA verify test: disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress] (NVBug 6312828, branch codex/nvbug6312828-proxy-deadline, fork chienchunhung, dry_run_close=true)

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --only-qa-verify test disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress]

@chienchunhung chienchunhung added the api-compatible Accepted LLM API contract change that is backwards-compatible label Jul 15, 2026
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59512 [ kill ] triggered by Bot. Commit: 0ad94a2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59512 [ kill ] completed with state SUCCESS. Commit: 0ad94a2
Successfully killed previous jobs for commit 0ad94a2

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --only-qa-verify test disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress]

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59514 [ run ] triggered by Bot. Commit: 0ad94a2 Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --only-qa-verify test disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress]

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59545 [ run ] triggered by Bot. Commit: 6fa5884 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59545 [ run ] completed with state FAILURE. Commit: 6fa5884
LLM_FUNCTION_AUTO_V2C #270 completed with status: 'UNSTABLE'
QA verify test: disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress] (NVBug 6312828, branch codex/nvbug6312828-proxy-deadline, fork chienchunhung, dry_run_close=true)

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --only-qa-verify test disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress]

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59737 [ run ] triggered by Bot. Commit: 92bfff6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59737 [ run ] completed with state FAILURE. Commit: 92bfff6
LLM_FUNCTION_AUTO_V2C #271 completed with status: 'UNSTABLE'
QA verify test: disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress] (NVBug 6312828, branch codex/nvbug6312828-proxy-deadline, fork chienchunhung, dry_run_close=true)

Link to invocation

@chienchunhung
chienchunhung force-pushed the codex/nvbug6312828-proxy-deadline branch from 92bfff6 to f58de71 Compare July 17, 2026 02:48
@NVIDIA NVIDIA deleted a comment from tensorrt-cicd Jul 17, 2026
@NVIDIA NVIDIA deleted a comment from tensorrt-cicd Jul 17, 2026
@NVIDIA NVIDIA deleted a comment from tensorrt-cicd Jul 17, 2026
@NVIDIA NVIDIA deleted a comment from tensorrt-cicd Jul 17, 2026
@NVIDIA NVIDIA deleted a comment from tensorrt-cicd Jul 17, 2026
@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --only-qa-verify test disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress]

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59856 [ run ] triggered by Bot. Commit: f58de71 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59856 [ run ] completed with state FAILURE. Commit: f58de71
LLM_FUNCTION_AUTO_V2C #272 completed with status: 'UNSTABLE'
QA verify test: disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress] (NVBug 6312828, branch codex/nvbug6312828-proxy-deadline, fork chienchunhung, dry_run_close=true)

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --only-qa-verify test disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress]

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59886 [ run ] triggered by Bot. Commit: e877ea8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59886 [ run ] completed with state FAILURE. Commit: e877ea8
LLM_FUNCTION_AUTO_V2C #273 completed with status: 'UNSTABLE'
QA verify test: disaggregated/test_disaggregated.py::test_disaggregated_stress_test[input8k-output1k-conc512-qwen3_32b_fp8_stress] (NVBug 6312828, branch codex/nvbug6312828-proxy-deadline, fork chienchunhung, dry_run_close=true)

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61316 [ run ] completed with state ABORTED. Commit: 3c7358c

Link to invocation

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61347 [ run ] triggered by Bot. Commit: 3c7358c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61320 [ run ] completed with state ABORTED. Commit: 3c7358c

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61347 [ run ] completed with state SUCCESS. Commit: 3c7358c
/LLM/main/L0_MergeRequest_PR pipeline #49574 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@chienchunhung
chienchunhung force-pushed the codex/nvbug6312828-proxy-deadline branch from 3c7358c to 0c4771a Compare July 24, 2026 23:18

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61658 [ run ] triggered by Bot. Commit: 0c4771a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61658 [ run ] completed with state FAILURE. Commit: 0c4771a
/LLM/main/L0_MergeRequest_PR pipeline #49863 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61746 [ run ] triggered by Bot. Commit: 0c4771a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61746 [ run ] completed with state FAILURE. Commit: 0c4771a
/LLM/main/L0_MergeRequest_PR pipeline #49948 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@chienchunhung
chienchunhung force-pushed the codex/nvbug6312828-proxy-deadline branch from 0c4771a to cdd5594 Compare July 27, 2026 17:25
@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61959 [ run ] triggered by Bot. Commit: cdd5594 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61959 [ run ] completed with state FAILURE. Commit: cdd5594
/LLM/main/L0_MergeRequest_PR pipeline #50148 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
@chienchunhung
chienchunhung force-pushed the codex/nvbug6312828-proxy-deadline branch from cdd5594 to d97d6c7 Compare July 28, 2026 01:36
@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62054 [ run ] triggered by Bot. Commit: d97d6c7 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62054 [ run ] completed with state SUCCESS. Commit: d97d6c7
/LLM/main/L0_MergeRequest_PR pipeline #50237 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "DGX_H100-PyTorch-4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-compatible Accepted LLM API contract change that is backwards-compatible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants