Skip to content

[None][fix] Progress idle disaggregated worker cancellation - #20702

Merged
chienchunhung merged 4 commits into
NVIDIA:mainfrom
chienchunhung:dev/pact-worker-cancellation
Oct 30, 2026
Merged

chienchunhung merged 4 commits into
NVIDIA:mainfrom
chienchunhung:dev/pact-worker-cancellation

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Cancelled disaggregated requests can remain pending while a worker waits for peer readiness or KV reception because ordinary cancellation runs after a model batch. Progress eligible cancellations without another batch, while retaining memory until the transceiver confirms safe retirement.

Scope

  • Transceiver capability permits session-free generation-first CTX cancellation without the ownership bridge; removing unactivated queued requests and cancelling session-owning GEN requests remain bridge-gated.
  • Pre-scheduling cancellation handles new and earlier-pass waits, prevents late readiness from reviving cancelled work, and preserves the first committed failure/cancellation outcome.
  • Synchronized error handling flushes preserved failures before idle fetching in normal and overlap loops, including empty ADP peers; overlap waits for input copies, and healthy iterations add no collective.
  • KV/AUX claims continue to block release; wider-world response gathers retain their existing aligned flush boundaries.
  • Model-active, C++, and KV-connector cancellation, retry policy, and feature activation remain unchanged.

Verification

  • 59 new CPU cases cover cancellation eligibility, outcome ordering, late readiness, KV/AUX retention, exactly-once cleanup, and both executor loops. All 59 passed on both x86 and ARM at pre-rebase head e7a4e3792a in CI #66928.
  • Pre-rebase full CI passed: pipeline #67147 / helper #81476 at the same e7a4e3792a. The retry report records 1,571 passed, 0 failed, and 671 skipped; previously successful stages, including CPU, were skipped.
  • Rebased onto main b6d1a0616f as 0723174104. All four patches are preserved; the only range-diff adjustment follows main's test-file relocation. Complete self-review, pre-commit, Python syntax, and diff checks passed. Runtime tests were not rerun at the rebased head (local pytest collection is blocked by missing PyTorch); full CI is skipped at the author's request.
  • Regression-first history is retained. No observed before-fix RED, measured coverage percentage, GPU/NIXL fencing, or real multi-rank qualification is claimed.

Notes

Complements #20491's service-level cancellation; this is not complete in-flight cancellation or coordinated retry support.

  • Reviewed the repository PR checklist as applicable; no new dependencies or user-facing configuration.

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79372 [ run ] triggered by Bot. Commit: 8bd93a1 Link to invocation

@chienchunhung
chienchunhung marked this pull request as ready for review October 20, 2026 21:26
@chienchunhung
chienchunhung requested review from a team as code owners October 20, 2026 21:26
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ee1f95b and 04104d3.

Files selected for processing: 5
  • tensorrt_llm/_torch/disaggregation/orchestration/coordinator.py
  • tensorrt_llm/_torch/pyexecutor/py_executor.py
  • tests/unittest/_torch/disaggregation/test_disagg_coordinator_errors.py
  • tests/unittest/_torch/disaggregation/test_disagg_idle_cancellation.py
  • tests/unittest/executor/test_forward_error_survival.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

The transceiver reports when idle disaggregated cancellation is supported. The executor processes eligible cancellations before scheduling and flushes synchronized transfer-error responses before it can block fetching work. Transfer errors remain available for synchronized failure cleanup.

Changes

Idle disaggregated cancellation

Layer / File(s) Summary
Idle-cancellation eligibility
tensorrt_llm/_torch/disaggregation/kv_cache_transceiver.py, tensorrt_llm/_torch/disaggregation/transceiver.py
The base transceiver adds a default-false idle-cancellation query. The V2 transceiver reports support based on bridge and request state, and preserves receive-session transfer errors during cancellation.
Pre-scheduling cancellation and error flush
tensorrt_llm/_torch/pyexecutor/py_executor.py, tensorrt_llm/_torch/disaggregation/orchestration/coordinator.py
The executor processes eligible cancellations before preparation and scheduling. The coordinator reports whether synchronized errors were handled. Both executor loops use that result to flush buffered responses at the required point.
Cancellation and error lifecycle validation
tests/unittest/_torch/disaggregation/test_disagg_idle_cancellation.py, tests/unittest/_torch/disaggregation/test_disagg_coordinator_errors.py, tests/unittest/_torch/disaggregation/test_benchmark_disagg.py, tests/unittest/_torch/disaggregation/test_disagg_inflight_cancel_gate.py, tests/unittest/_torch/disaggregation/test_disagg_loop_transcript.py, tests/unittest/_torch/executor/test_kv_connector_executor_lifetime.py, tests/unittest/executor/test_forward_error_survival.py
Tests cover cancellation eligibility and timing, transfer-error preservation and flushing, resource retention, and preparation behavior. Supporting fixtures set cancellation IDs, coordinator results, and request states.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant RequestQueue
  participant PyExecutor
  participant KvCacheTransceiver
  participant DisaggTransferCoordinator
  RequestQueue->>PyExecutor: provide pending cancellation IDs
  PyExecutor->>KvCacheTransceiver: query idle-cancellation support
  PyExecutor->>DisaggTransferCoordinator: request cancellation authorization
  DisaggTransferCoordinator->>PyExecutor: return cancellation decision
  PyExecutor->>DisaggTransferCoordinator: handle synchronized transfer errors
  DisaggTransferCoordinator->>PyExecutor: return whether errors were handled
  PyExecutor->>PyExecutor: flush buffered responses before scheduling or idle fetch
Loading

Possibly related PRs

Merge Risk: Minimal · up to 04104

This change lets idle disaggregated requests be cancelled before scheduling while keeping request memory until the transceiver confirms it can be released. I found no outstanding defect in the supplied evidence. The remaining step is the ordinary check that CI passes on the current head.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately describes the primary change: progressing idle disaggregated worker cancellation.
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.
Description check Passed The pull request description clearly explains the problem, solution, scope, limitations, test coverage, verification results, and checklist status. It uses custom headings instead of the template's ex…
Full details: Description check

Explanation

The pull request description clearly explains the problem, solution, scope, limitations, test coverage, verification results, and checklist status. It uses custom headings instead of the template's exact "Description" and "Test Coverage" headings, but it provides the required information and is mostly complete.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79372 [ run ] completed with state SUCCESS. Commit: 8bd93a1
/LLM/main/L0_MergeRequest_PR pipeline #65371 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 #79772 [ run ] triggered by Bot. Commit: 561bcd9 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79772 [ run ] completed with state SUCCESS. Commit: 561bcd9
/LLM/main/L0_MergeRequest_PR pipeline #65671 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    Then re-trigger CI with the same bot command (no rebase needed).

⚠️ 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

@bo-nv bo-nv 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.

Beyond the comments already raised by other reviewers, I didn't find any blocking issues from the disagg side. LGTM.

@chienchunhung
chienchunhung force-pushed the dev/pact-worker-cancellation branch from 561bcd9 to 5974137 Compare October 23, 2026 22:06

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80277 [ run ] triggered by Bot. Commit: 5974137 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80277 [ run ] completed with state FAILURE. Commit: 5974137
/LLM/main/L0_MergeRequest_PR pipeline #66069 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 dev/pact-worker-cancellation branch from 5974137 to ee1f95b Compare October 27, 2026 00:00

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@chienchunhung
chienchunhung force-pushed the dev/pact-worker-cancellation branch from 04104d3 to e7a4e37 Compare October 28, 2026 19:26

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81238 [ run ] triggered by Bot. Commit: e7a4e37 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81238 [ run ] completed with state FAILURE. Commit: e7a4e37
/LLM/main/L0_MergeRequest_PR pipeline #66928 completed with status: 'FAILURE'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #9610: L40S-PyTorch-2 is temporarily paused due to Kubernetes agent provisioning and node issues.
Affected stages:
L40S-PyTorch-2

⚠️ 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 #81476 [ run ] triggered by Bot. Commit: e7a4e37 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81476 [ run ] completed with state SUCCESS. Commit: e7a4e37
/LLM/main/L0_MergeRequest_PR pipeline #67147 completed with status: 'SUCCESS'

CI Report

Link to invocation

@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.

unblock from runtime

@chienchunhung
chienchunhung enabled auto-merge (squash) October 30, 2026 18:01
@chienchunhung
chienchunhung force-pushed the dev/pact-worker-cancellation branch from e7a4e37 to 0723174 Compare October 30, 2026 18:29

Copy link
Copy Markdown
Collaborator Author

/bot skip --commit "Full CI verified before the rebase."

@github-actions

Copy link
Copy Markdown

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

Details

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental) --high-priority]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Supports wildcard * for pattern matching (e.g., "*PerfSanity*" matches all stages containing PerfSanity). Examples: "A10-PyTorch-1, xxx", "PerfSanity". The patterns "*", "*Post-Merge*", and "*PerfSanity*", including equivalent escaped or repeated-star forms and their use in comma-separated lists, require the ci: post-merge approved PR label. Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Requires the ci: full pre-merge approved label on the PR (ask a member of NVIDIA/trt-llm-ci-approvers). Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline. Requires the ci: full pre-merge approved label on the PR (ask a member of NVIDIA/trt-llm-ci-approvers).

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline. Requires the ci: post-merge approved PR label applied by an active member of NVIDIA/trt-llm-ci-approvers. The approval label remains in place when new commits are pushed.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Supports wildcard * for pattern matching. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx", --extra-stage "Post-Merge". The patterns "*", "*Post-Merge*", and "*PerfSanity*", including equivalent escaped or repeated-star forms and their use in comma-separated lists, require the ci: post-merge approved PR label.

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

--high-priority (OPTIONAL) : Run the pipeline with high priority. This option is restricted to authorized users only and will route the job to a high-priority queue.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "Full CI verified before the rebase."

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81737 [ skip ] triggered by Bot. Commit: 0723174 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81737 [ skip ] completed with state SUCCESS. Commit: 0723174
Skipping testing for commit 0723174

Link to invocation

@chienchunhung
chienchunhung merged commit 1a1ba9a into NVIDIA:main Oct 30, 2026
bo-nv added a commit to bo-nv/TensorRT-LLM that referenced this pull request Nov 2, 2026
Resolve the conflict in KvCacheTransceiver with main (NVIDIA#20702), which adds
supports_idle_request_cancellation next to this PR's
context_transfer_is_waiting_for_peer and context_transfer_peer_ready_time;
both sets of methods are kept.

Signed-off-by: Bo Deng <[email protected]>
SimengLiu-nv added a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Nov 3, 2026
…generation server

Without in-flight cancellation, the generation-side KV-transfer timeout
only flags the request in check_transfer_timeouts. The cancel and the
error response happen in the response pass, which runs only after a
forward step. A generation server with nothing else scheduled therefore
kept a request whose KV never arrived until the client gave up, even after
logging "Observed timeout on generation request".

DisaggTransferCoordinator.poll_gen_transfers, which runs at every loop
head, now cancels and fails the receives that check_transfer_timeouts
flagged whenever in-flight cancellation is inactive. This covers any
transceiver without that capability, including KvCacheTransceiverV2 and
TRTLLM_DISAGG_ENABLE_INFLIGHT_CANCEL=1 on an unsupporting transceiver. A
cancel that finishes at once fails the request through fail_timed_out,
inline or buffered for handle_timeouts_synced under multi-rank ADP. A
cancel the transceiver refuses is asked only once: the Python transceiver
has then marked the session cancelled and the next reap_gen_receives fails
the request through the transfer-error path, while the C++ transceiver
cannot cancel a receive already in flight and would only repeat its
"Cannot cancel request" warning at the idle loop rate. Requests the user
cancelled are left to the cancel path. No collective is added. The
in-flight cancellation path is unchanged.

fail_timed_out now moves a request still in
DISAGG_GENERATION_TRANS_IN_PROGRESS to DISAGG_TRANS_ERROR before failing
it. cancel_request does not change the state, so PyExecutor._handle_errors
parked the failure for a transfer that no longer existed, and
_sweep_transfer_held_failures then dropped it because the request had
already left active_requests: no error response was sent and the KV was
never freed. This also fixes the same loss on the existing response-pass
timeout path.

Main's idle request cancellation (NVIDIA#20702) retires requests the client
cancelled while no batch runs, where the transceiver reports
supports_idle_request_cancellation. It does not act on transfer
timeouts, which this change covers; client cancels stay on that path.
As on the response-pass timeout path, cancel_request decides whether a
receive can stop, and refuses one that is still writing.

Signed-off-by: Simeng Liu <[email protected]>
SimengLiu-nv added a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Nov 4, 2026
…generation server

Without in-flight cancellation, the generation-side KV-transfer timeout
only flags the request in check_transfer_timeouts. The cancel and the
error response happen in the response pass, which runs only after a
forward step. A generation server with nothing else scheduled therefore
kept a request whose KV never arrived until the client gave up, even after
logging "Observed timeout on generation request".

DisaggTransferCoordinator.poll_gen_transfers, which runs at every loop
head, now cancels and fails the receives that check_transfer_timeouts
flagged whenever in-flight cancellation is inactive. This covers any
transceiver without that capability, including KvCacheTransceiverV2 and
TRTLLM_DISAGG_ENABLE_INFLIGHT_CANCEL=1 on an unsupporting transceiver. A
cancel that finishes at once fails the request through fail_timed_out,
inline or buffered for handle_timeouts_synced under multi-rank ADP. A
cancel the transceiver refuses is asked only once: the Python transceiver
has then marked the session cancelled and the next reap_gen_receives fails
the request through the transfer-error path, while the C++ transceiver
cannot cancel a receive already in flight and would only repeat its
"Cannot cancel request" warning at the idle loop rate. Requests the user
cancelled are left to the cancel path. No collective is added. The
in-flight cancellation path is unchanged.

fail_timed_out now moves a request still in
DISAGG_GENERATION_TRANS_IN_PROGRESS to DISAGG_TRANS_ERROR before failing
it. cancel_request does not change the state, so PyExecutor._handle_errors
parked the failure for a transfer that no longer existed, and
_sweep_transfer_held_failures then dropped it because the request had
already left active_requests: no error response was sent and the KV was
never freed. This also fixes the same loss on the existing response-pass
timeout path.

Main's idle request cancellation (NVIDIA#20702) retires requests the client
cancelled while no batch runs, where the transceiver reports
supports_idle_request_cancellation. It does not act on transfer
timeouts, which this change covers; client cancels stay on that path.
As on the response-pass timeout path, cancel_request decides whether a
receive can stop, and refuses one that is still writing.

Signed-off-by: Simeng Liu <[email protected]>
SimengLiu-nv added a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Nov 12, 2026
…generation server

Without in-flight cancellation, the generation-side KV-transfer timeout
only flags the request in check_transfer_timeouts. The cancel and the
error response happen in the response pass, which runs only after a
forward step. A generation server with nothing else scheduled therefore
kept a request whose KV never arrived until the client gave up, even after
logging "Observed timeout on generation request".

DisaggTransferCoordinator.poll_gen_transfers, which runs at every loop
head, now cancels and fails the receives that check_transfer_timeouts
flagged whenever in-flight cancellation is inactive. This covers any
transceiver without that capability, including KvCacheTransceiverV2 and
TRTLLM_DISAGG_ENABLE_INFLIGHT_CANCEL=1 on an unsupporting transceiver. A
cancel that finishes at once fails the request through fail_timed_out,
inline or buffered for handle_timeouts_synced under multi-rank ADP. A
cancel the transceiver refuses is asked only once: the Python transceiver
has then marked the session cancelled and the next reap_gen_receives fails
the request through the transfer-error path, while the C++ transceiver
cannot cancel a receive already in flight and would only repeat its
"Cannot cancel request" warning at the idle loop rate. Requests the user
cancelled are left to the cancel path. No collective is added. The
in-flight cancellation path is unchanged.

fail_timed_out now moves a request still in
DISAGG_GENERATION_TRANS_IN_PROGRESS to DISAGG_TRANS_ERROR before failing
it. cancel_request does not change the state, so PyExecutor._handle_errors
parked the failure for a transfer that no longer existed, and
_sweep_transfer_held_failures then dropped it because the request had
already left active_requests: no error response was sent and the KV was
never freed. This also fixes the same loss on the existing response-pass
timeout path.

Main's idle request cancellation (NVIDIA#20702) retires requests the client
cancelled while no batch runs, where the transceiver reports
supports_idle_request_cancellation. It does not act on transfer
timeouts, which this change covers; client cancels stay on that path.
As on the response-pass timeout path, cancel_request decides whether a
receive can stop, and refuses one that is still writing.

Signed-off-by: Simeng Liu <[email protected]>
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.

5 participants