Skip to content

[None][fix] Guard V2 mamba state-index tables against ADP dummy-request overflow#2

Open
lingjiew wants to merge 1 commit into
nv-guomingz:user/guomingz/qwen3.5_agentxfrom
lingjiew:user/lingjiew/fix-v2-adp-dummy-slot-overflow
Open

[None][fix] Guard V2 mamba state-index tables against ADP dummy-request overflow#2
lingjiew wants to merge 1 commit into
nv-guomingz:user/guomingz/qwen3.5_agentxfrom
lingjiew:user/lingjiew/fix-v2-adp-dummy-slot-overflow

Conversation

@lingjiew

@lingjiew lingjiew commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Bug

PyExecutor._pad_attention_dp_dummy_request -> add_dummy_requests extends the previous iteration's self.requests, so V2MambaHybridCacheManager._setup_state_indices can see len(self.requests) > max_batch and index past the max_batch-sized cuda_state_indices / _host_state_indices tables:

IndexError at _setup_state_indices: index == max_batch

Repro

Qwen3.5-397B-A17B-NVFP4 disagg CTX worker with attention-DP on GB300, this branch @ c78b793: max_batch 8 or 16, concurrency >= 8, AgentX multi-turn trace replay — crashes within minutes (three independent jobs, all dying at the same line with index == max_batch).

Fix

Defensive guard: grow the two state-index tables with a warning instead of crashing. The underlying sizing fix belongs in the add_dummy_requests bookkeeping (dummy slots should stay within the table bounds) — happy to rework it there if you prefer.

Validation

Image built from this branch + this patch: the guard fired ~7x per run with no further incident across a 37-point ctx-only sweep and a 52-point gen-only sweep on GB300 — full combo (V2MambaHybridCacheManager + python transceiver + KV cache reuse at realized 93-94% + conversation-affinity ADP router + MTP forced-AL) all green.

🤖 Generated with Claude Code

…st overflow

_pad_attention_dp_dummy_request -> add_dummy_requests extends the
previous iteration's self.requests, so _setup_state_indices can see
len(self.requests) > max_batch and index past the max_batch-sized
cuda/_host_state_indices tables (IndexError at index == max_batch).
Reproduced on Qwen3.5-397B-A17B hybrid disagg CTX workers with
attention-DP (max_batch 8 and 16, concurrency >= 8).

Grow the tables dynamically with a warning instead of crashing. The
guard fired ~7x per run across a 37-point ctx-only sweep and a
52-point gen-only sweep on GB300 with no further incident; the
underlying sizing fix belongs in the add_dummy_requests bookkeeping.

Signed-off-by: Lingjie Wu <lingjiew@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant