From 73e1942c81a5e3e15ece5a531a155cdeb9b65e0e Mon Sep 17 00:00:00 2001 From: Xianjie <5410381+qiaoxj07@users.noreply.github.com> Date: Fri, 15 May 2026 09:27:13 +0800 Subject: [PATCH] [None][fix] Return 3-tuple from check_gen_transfer_status fast path The pure-CTX early-out in `KvCacheTransceiverV2.check_gen_transfer_status` returned a 2-tuple `[], []` while the normal path (and the sole caller in `py_executor._check_disagg_gen_cache_transfer_status`) expects a 3-tuple `(completed, failed, cancelled_reqs)`. On a GEN rank whose `_ever_had_recv_session` is still False (e.g. the very first scheduling iteration after warm-up, before any session has been opened), the early-return triggered: ValueError: not enough values to unpack (expected 3, got 2) File py_executor.py:3874, in _check_disagg_gen_cache_transfer_status _, _, cancelled_reqs = result which killed the executor thread and hung the disagg-gen workers. Fix by returning `[], [], []` so both return paths agree on arity. Signed-off-by: Xianjie Qiao Signed-off-by: Xianjie <5410381+qiaoxj07@users.noreply.github.com> --- tensorrt_llm/_torch/disaggregation/transceiver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorrt_llm/_torch/disaggregation/transceiver.py b/tensorrt_llm/_torch/disaggregation/transceiver.py index 6139dcaae980..d94fbae20424 100644 --- a/tensorrt_llm/_torch/disaggregation/transceiver.py +++ b/tensorrt_llm/_torch/disaggregation/transceiver.py @@ -523,7 +523,7 @@ def check_context_transfer_status( def check_gen_transfer_status(self, at_least_request_num: Optional[int]): # Skip the allgather in _gen_consensus when this transceiver never receives (pure CTX role). if not self._ever_had_recv_session: - return [], [] + return [], [], [] block_all = at_least_request_num is None wait_num = at_least_request_num if not block_all else 0