Repository navigation
[TRTLLM-17083][feat] Cancel paired GEN on CTX failure or cancellation - #20491
Conversation
|
/bot run |
|
PR_Github #78549 [ run ] triggered by Bot. Commit: |
|
PR_Github #78549 [ run ] completed with state
|
mikeiovine
left a comment
There was a problem hiding this comment.
Stamp on behalf of runtime devs, delegating proper review to @NVIDIA/trt-llm-disagg-devs
4df975b to
f870cd4
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #79059 [ run ] triggered by Bot. Commit: |
|
PR_Github #79059 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #79328 [ run ] triggered by Bot. Commit: |
|
PR_Github #79328 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #80780 [ run ] completed with state
|
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
41e8f0a to
708ff27
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #81232 [ run ] triggered by Bot. Commit: |
|
PR_Github #81232 [ run ] completed with state Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #10093: L40S-PyTorch-2 is temporarily paused due to Kubernetes agent provisioning and node issues.
|
|
/bot run --disable-fail-fast |
|
PR_Github #81475 [ run ] triggered by Bot. Commit: |
|
PR_Github #81475 [ run ] completed with state
|
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
708ff27 to
ca7ca1e
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #81727 [ run ] triggered by Bot. Commit: |
|
PR_Github #81727 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #81778 [ run ] triggered by Bot. Commit: |
|
PR_Github #81778 [ run ] completed with state |
…t chunk with an HTTP error A generation server whose KV-cache transfer fails raises in its stream generator after the 200 headers. The disaggregated server relayed that as a 200 whose body was cut off, so the client saw a truncated stream instead of an error. _wrap_entry_point now pulls a relayed stream's first chunk before it sends the headers. A chat or completion stream that fails before its first chunk reaches _handle_exception and becomes an HTTP error. The returned relay is already started, so closing it before it is iterated still closes the upstream stream and releases the router reservation. Responses streams keep their 200 plus an `error` event, because guard_responses_stream stays inside the first-chunk pull. /v1/messages keeps sending its headers at once: its reframed stream pings until the first chunk, and a failure before that chunk ends in an Anthropic `error` event, as before. total_responses now counts a held stream only once its first chunk arrived. The client's retry rules for generation legs are main's (NVIDIA#20938, NVIDIA#20491). The client tests gain the cases main does not cover: the chat and Responses request kinds failing after the headers over a real connection, the transient retry budget and TRTLLM_DISAGG_NO_RETRY for an undelivered leg, and three more possibly-delivered errors. disagg-serving.md describes the retry rules, including the frontend-affinity fallback that TRTLLM_DISAGG_NO_RETRY does not disable. Signed-off-by: Simeng Liu <simengl@nvidia.com>
…t chunk with an HTTP error A generation server whose KV-cache transfer fails raises in its stream generator after the 200 headers. The disaggregated server relayed that as a 200 whose body was cut off, so the client saw a truncated stream instead of an error. _wrap_entry_point now pulls a relayed stream's first chunk before it sends the headers. A chat or completion stream that fails before its first chunk reaches _handle_exception and becomes an HTTP error. The returned relay is already started, so closing it before it is iterated still closes the upstream stream and releases the router reservation. Responses streams keep their 200 plus an `error` event, because guard_responses_stream stays inside the first-chunk pull. /v1/messages keeps sending its headers at once: its reframed stream pings until the first chunk, and a failure before that chunk ends in an Anthropic `error` event, as before. total_responses now counts a held stream only once its first chunk arrived. The client's retry rules for generation legs are main's (NVIDIA#20938, NVIDIA#20491). The client tests gain the cases main does not cover: the chat and Responses request kinds failing after the headers over a real connection, the transient retry budget and TRTLLM_DISAGG_NO_RETRY for an undelivered leg, and three more possibly-delivered errors. disagg-serving.md describes the retry rules, including the frontend-affinity fallback that TRTLLM_DISAGG_NO_RETRY does not disable. Signed-off-by: Simeng Liu <simengl@nvidia.com>
Summary
Generation-first serving can leave one worker waiting after its paired request fails or the caller cancels. Cancel and drain pending sibling work while preserving worker errors and already-completed GEN responses.
Scope
/finishwith the original request ID, including content-key selection, without dispatching inference.HTTP cancellation does not prove physical KV quiescence or authorize memory reuse. Other retry behavior, including main's safeguards from #20938, is unchanged; coordinated paired retries remain separate work. Coordinator cleanup retains asynchronous expiry fallback on outages/queue overflow; local timeout does not fence remote selection.
Verification
Current head:
ca7ca1e5bda9b5f37da532b63e73297288029290.708ff2707d: CI #66922 passed 407 tests on x86 and 407 on ARM across these four modules. These are module results, not a full-pipeline pass or verification of the new SSE fix.Notes
Complements #20459 on
release/1.3; this PR targetsmain. #20702 handles idle-worker cancellation separately; physical retirement safeguards such as #19674 remain necessary.Unchanged follow-up: streaming CTX placement acquired before GEN selection can remain until expiry if cancellation occurs before CTX dispatch.