Skip to content

[None][fix] Fail stop executor worlds on unproven KV retirement - #19674

Merged
chienchunhung merged 4 commits into
NVIDIA:mainfrom
chienchunhung:dev/dbr-pr6-executor-containment
Oct 2, 2026
Merged

chienchunhung merged 4 commits into
NVIDIA:mainfrom
chienchunhung:dev/dbr-pr6-executor-containment

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fail-stop when exposed KV-transfer resources remain unproven after their fixed quiescence deadline. Retain KV and transport resources until termination; timeout never authorizes ordinary cleanup or memory reuse.

Builds on merged #19378 and #19673. Rebased onto main 0d3bbd257d; current head 0efe12dab0; only this PR’s containment and acknowledgment changes remain.

Scope

  • Transfer protocol: add SESSION_QUIESCED acknowledgments for cancelled CTX requests, including requests without a send session or with expired metadata. Cancellation permanently fences the immutable request ID; existing KV/AUX accesses must drain before acknowledgment. ACKs follow earlier results on the same worker/socket. Missing-result retirement requires ACKs from every published candidate, without inventing data-transfer success or bypassing CUDA, IN_DOUBT, or fatal-expiry guards.
  • Transceiver: capture an initialized MPI_THREAD_MULTIPLE communicator matching executor rank/size, retain unresolved resources, and connect fatal expiry to termination. Fatal logging gets at most a 0.5-second join before unconditional kill dispatch, even if logging blocks or thread setup fails.
  • Hard-kill helper: let deadline containment bypass potentially blocked diagnostics; other callers retain their defaults.
  • Remains opt-in for the existing Python/NIXL generation-first ADP/NVFP4, no-bounce profile. Deployment must use the same revision and set both TRTLLM_ENABLE_FP4_MLA_KV_OWNERSHIP_BRIDGE=1 and TRTLLM_DISAGG_NO_RETRY=1 on every participant. Mixed-version peers and non-MPI launchers are not qualified.

Availability tradeoff: a persistent NIXL error retains sender roots and can cause connected CTX workers to fail-stop, interrupting unrelated requests. MPI abort can terminate the entire MPI job, including other executors in split communicators. Backend fencing or finer-grained quarantine could reduce this impact in a separate change.

Cancellation-fence cost: ownership mode intentionally retains one request-ID fence for the Sender’s lifetime per distinct cancelled request on each addressed CTX rank. Budget roughly 0.1 KB of host metadata per ID per rank (about 100 MB per million IDs, allocator-dependent; not a hard upper bound), not KV/GPU storage. ADP broadcasts multiply this across ranks. Metadata TTL and transfer timeout do not bound late session admission, so TTL/LRU eviction would be unsafe; bounded reclamation needs a separate admission-expiry or epoch contract.

Safety boundary: process termination alone does not prove GPU/RDMA access revocation. Exact-profile multi-rank NIXL behavior, surviving-peer handling, platform fencing, and safe replacement remain qualification gates; automatic replacement safety is not claimed.

Verification

  • Regression evidence: clean 904ce917b7 reproduced four behavioral assertion failures for missing no-session/expired-metadata acknowledgment and reopened admission; the active-write safety guard passed. These historical motivators are a subset of the expanded suite.
  • Current head 0efe12dab0: full CI #75941 / pipeline #62616 recorded 206 passes on each of CPU x86 and ARM: 32 fail-stop, 29 session-acknowledgment, 81 retirement-deadline, and 64 ownership-regression cases. This includes real two-rank termination/fresh-world and four-rank split-executor MPI tests. The existing unittest/disaggregated CPU test-list entry collects these modules.
  • Compatibility: H100 bounded-polling tests: 59 passed, 1 pre-existing skip; all 47 hang-detector tests passed on H100 and B300. Scoped hooks and fresh full-diff self-review passed; all review threads are resolved.
  • These are verified per-test results, not an overall CI pass: #62616 failed outside these suites (recurring ARM MPI/MLA failures and sampler timeout/native crash). History and automatic retry results do not indicate a regression from this PR. Full rerun PR_Github #75978 launched at the same head with /bot run --disable-fail-fast. CPU/MPI coverage does not establish GPU/RDMA revocation or safe automatic replacement.

Dev Engineer Review

SESSION_QUIESCED acknowledgments provide evidence that cancelled sender sessions have drained before the receiver retires exposed KV resources. Physical-ownership mode tracks eligible and published writers, handles partial publication, and retains resources when access remains unproven. Non-ownership transfer paths retain their existing behavior.

The transceiver enables fail-stop only for the ownership bridge profile. Startup requires initialized, unfinalized MPI with MPI_THREAD_MULTIPLE and a matching intracommunicator. The fatal path bounds best-effort diagnostics and requests hard termination without ordinary cleanup. propagate_hard_kill adds optional diagnostics and communicator arguments. Receiver.send_cancel_to_senders now returns a set, and TxSession.cancel_local adds a keyword-only argument; callers and mocks must account for these API changes.

The profile remains limited to the stated Python/NIXL generation-first ADP/NVFP4 no-bounce configuration. The supplied objectives warn that MPI abort can affect the whole MPI job and that connected CTX workers may be interrupted. Production GPU/RDMA access revocation and replacement safety are not established. The reported test run passed on a pre-rebase snapshot; current-head test results and production qualification remain pending.

QA Engineer Review

Five test files changed. They cover cancellation acknowledgment ordering, physical-access retirement, deadline handling, MPI qualification and termination, retained resources after failed or unresolved operations, and proxy behavior after worker death. Named tests include test_session_ack_waits_for_admitted_and_submitting_pieces, test_unproven_fatal_bounds_log_join_and_always_dispatches_kill, and test_retirement_rejects_unqualified_executor_world. The bounded-polling test file also contains a skipped idle context-consensus fast-path test.

No test-list files changed. Of the five changed test files, only tests/unittest/disaggregated/test_transceiver_bounded_polling.py appears in an integration CI list (test-db/l0_h100.yml). The other four files do not appear in the inspected integration lists. Coverage verdict: needs follow-up. The author reports 424 passed, one pre-existing skip, and no failures or errors on the tested snapshot. Current-head test results remain pending.

Per-File QA Perspective

  • tensorrt_llm/_torch/disaggregation/native/transfer.py: Cancellation can now produce session-quiescence evidence, and acknowledgments wait for pending results and settlements. Verify acknowledgment ordering, partial publication, and unchanged behavior outside physical-ownership mode.
  • tensorrt_llm/_torch/disaggregation/transceiver.py: The ownership bridge validates and captures an MPI communicator, enables fatal expiry handling, and drains before shutdown. Verify profile gating, communicator checks, shutdown behavior, and resource retention when retirement remains unproven.
  • tensorrt_llm/_torch/pyexecutor/hang_detector.py: propagate_hard_kill can skip diagnostics and use a supplied communicator. Verify both diagnostic modes and MPI behavior when finalized or when no communicator is supplied.
  • tests/unittest/disaggregated/test_kv_transfer_fail_stop.py: Tests qualification, bounded fatal logging, retention, shutdown, proxy behavior, and MPI termination scenarios. It is not listed in the inspected integration CI or manual-QA lists.
  • tests/unittest/disaggregated/test_retirement_deadline.py: Tests deadline boundaries, admission closure, unresolved-owner retention, and blocked backend behavior. It is not listed in the inspected integration CI or manual-QA lists.
  • tests/unittest/disaggregated/test_transceiver_bounded_polling.py: Adds ownership-bridge fail-stop gating coverage and exercises bounded polling and session completion. It is listed in tests/integration/test_lists/test-db/l0_h100.yml; no manual-QA listing was found.
  • tests/unittest/disaggregated/test_transfer_ownership_regressions.py: Updates cancellation fixtures and tests ownership retention, retirement evidence, shutdown, and pre-cancelled sender behavior. It is not listed in the inspected integration CI or manual-QA lists.
  • tests/unittest/disaggregated/test_unsubmitted_session.py: Tests pre-session and existing-session cancellation acknowledgments, settlement ordering, unsettled physical access, stale evidence, and deadline expiry. It is not listed in the inspected integration CI or manual-QA lists.

@chienchunhung
chienchunhung force-pushed the dev/dbr-pr6-executor-containment branch 3 times, most recently from 109cf30 to ea584bf Compare September 29, 2026 05:37
@chienchunhung
chienchunhung force-pushed the dev/dbr-pr6-executor-containment branch from ea584bf to 904ce91 Compare September 30, 2026 05:31

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75782 [ run ] triggered by Bot. Commit: 904ce91 Link to invocation

@chienchunhung
chienchunhung marked this pull request as ready for review September 30, 2026 05:42
@chienchunhung
chienchunhung requested review from a team as code owners September 30, 2026 05:42
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/TensorRT-LLM/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 27225a88-5943-4b6b-933d-14f340e28878

📥 Commits

Reviewing files that changed from the base of the PR and between e5ea231 and 0efe12d.

📒 Files selected for processing (2)
  • tensorrt_llm/_torch/disaggregation/transceiver.py
  • tests/unittest/disaggregated/test_kv_transfer_fail_stop.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/unittest/disaggregated/test_kv_transfer_fail_stop.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.


Walkthrough

Physical-ownership transfer sessions now track eligible and published writers separately. Cancellation can trigger sender session-quiescence acknowledgments that contribute to receive retirement evidence. The transceiver qualifies MPI fail-stop handling for unresolved retirement and changes shutdown ordering.

Changes

Transfer quiescence and retirement

Layer / File(s) Summary
Receive ownership and cancellation evidence
tensorrt_llm/_torch/disaggregation/native/transfer.py, tests/unittest/disaggregated/test_unsubmitted_session.py, tests/unittest/disaggregated/test_retirement_deadline.py
Receive owners track eligible and published writer sets. Acknowledgments from published writers can establish physical drainage, subject to existing publication and completion checks. Receive sessions track cancellation notifications and validate acknowledgments. Tests cover candidate evidence, partial publication, and retirement conditions.
Sender cancellation fences and acknowledgments
tensorrt_llm/_torch/disaggregation/native/transfer.py, tests/unittest/disaggregated/test_unsubmitted_session.py, tests/unittest/disaggregated/test_transfer_ownership_regressions.py
In physical-ownership mode, cancellation fences persist across session creation and cleanup. Sender workers order acknowledgments with piece results and retry them until session work and pending settlements drain. Pre-canceled sessions can avoid reporting unsubmitted auxiliary failures.
Executor fail-stop and shutdown handling
tensorrt_llm/_torch/disaggregation/transceiver.py, tensorrt_llm/_torch/pyexecutor/hang_detector.py, tests/unittest/disaggregated/test_kv_transfer_fail_stop.py, tests/unittest/disaggregated/test_transceiver_bounded_polling.py, tests/unittest/disaggregated/test_transfer_ownership_regressions.py
The ownership bridge qualifies and retains an MPI communicator for fatal callbacks. Hard-kill propagation supports an explicit communicator and optional diagnostics. Shutdown requests worker drain before session closure. Tests cover callback configuration, watchdog expiry, process containment, and shutdown behavior.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant RxSession
  participant Receiver
  participant SenderWorker
  RxSession->>Receiver: Notify cancellation to known sender endpoints
  Receiver->>SenderWorker: Send cancellation with request ID and receiver rank
  SenderWorker->>Receiver: Send SESSION_QUIESCED after pending work drains
  Receiver->>RxSession: Record acknowledgment for a published writer
Loading

Suggested reviewers: brnguyen2

Merge Risk: 🟡 Moderate · up to 0efe1

Sender memory may grow with every peer cancellation in long-running servers that use this opt-in profile. This should be bounded or explicitly accepted before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.02% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 131 functions across 11 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the fix: fail-stopping executor worlds when KV retirement remains unproven. It follows the required [None][fix] format.
Description check ✅ Passed The description is detailed and relevant. It explains the problem, implementation scope, risks, deployment conditions, and verification results. Although it uses Summary, Scope, and Verification inste…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@nv-xtf nv-xtf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying the tradeoff and adding the boundary tests. LGTM

@Shixiaowei02

Copy link
Copy Markdown
Collaborator

Thanks for the effort!

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75782 [ run ] completed with state SUCCESS. Commit: 904ce91
/LLM/main/L0_MergeRequest_PR pipeline #62482 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

@trtllm-agent

This comment has been minimized.

@coderabbitai

This comment has been minimized.

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75872 [ run ] triggered by Bot. Commit: 904ce91 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75872 [ run ] completed with state FAILURE. Commit: 904ce91
/LLM/main/L0_MergeRequest_PR pipeline #62554 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

@trtllm-agent

This comment has been minimized.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75935 [ run ] triggered by Bot. Commit: e5ea231 Link to invocation

Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75941 [ run ] triggered by Bot. Commit: 0efe12d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75935 [ run ] completed with state ABORTED. Commit: e5ea231

Link to invocation

@trtllm-agent

This comment has been minimized.

@coderabbitai

This comment has been minimized.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75941 [ run ] completed with state SUCCESS. Commit: 0efe12d
/LLM/main/L0_MergeRequest_PR pipeline #62616 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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75978 [ run ] triggered by Bot. Commit: 0efe12d Link to invocation

@trtllm-agent

This comment has been minimized.

@coderabbitai

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Semantic conflict review

The verdict of record is the Semantic conflict with target branch / PR #19674 commit status on the requested head commit. This summary updates on reply events and may lag between a new request and its reply.

Latest recorded state: No semantic conflict found (best effort) for head 0efe12dab04d44841ebd39e28d9f767c06828006, target a81da8a5a8380c4ec8c2d3eafabb8cfc55d7ad56, merge base 0d3bbd257d353f4ab21c108285df8b2758e6ffd5 (request 986c0566-0505-4690-a9fa-f9d019a1a961). CodeRabbit analysis.

Best-effort AI judgment for the recorded revisions. PASS, FAIL and INCONCLUSIVE may be incomplete or incorrect. PR authors and reviewers should independently verify the evidence and relevant behavior. This semantic review and its status/workflow are advisory, not required merge checks under current repository rules; other merge requirements still apply. Advisory status does not make a confirmed defect safe to ignore.

Requested (UTC) Head Target Verdict Comment
2026-10-02T08:50:15Z 0efe12dab04d a81da8a5a838 PASS reply
2026-10-02T02:46:43Z 0efe12dab04d 5ce4cb57cb8e PASS reply
2026-10-01T19:04:57Z 0efe12dab04d 28c5d5a5c560 PASS reply
2026-10-01T12:50:10Z 0efe12dab04d ee510fc85d39 PASS reply
2026-10-01T04:49:24Z 904ce917b774 95cb50c35883 PASS reply
2026-09-30T14:43:21Z 904ce917b774 50f85bfe3e94 PASS reply

Processed request and reply comments are minimized to reduce timeline noise; they remain expandable for audit.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #75978 [ run ] completed with state FAILURE. Commit: 0efe12d
/LLM/main/L0_MergeRequest_PR pipeline #62646 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

@chienchunhung
chienchunhung enabled auto-merge (squash) October 1, 2026 21:41
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76011 [ run ] triggered by Bot. Commit: 0efe12d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76011 [ run ] completed with state SUCCESS. Commit: 0efe12d
/LLM/main/L0_MergeRequest_PR pipeline #62675 completed with status: 'UNSTABLE'

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

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76049 [ run ] triggered by Bot. Commit: 0efe12d Link to invocation

@trtllm-agent

This comment has been minimized.

@coderabbitai

This comment has been minimized.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76049 [ run ] completed with state SUCCESS. Commit: 0efe12d
/LLM/main/L0_MergeRequest_PR pipeline #62704 completed with status: 'SUCCESS'

CI Report

Link to invocation

@trtllm-agent

This comment has been minimized.

@coderabbitai

This comment has been minimized.

@allisonlim-nv allisonlim-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unblocking from runtime, mainly a disagg review

@chienchunhung
chienchunhung merged commit f7518a6 into NVIDIA:main Oct 2, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants