[https://nvbugs/6104831][test] Add reproducers for KV-cache-block cascade prune assertion#13571
Draft
chienchunhung wants to merge 1 commit intoNVIDIA:mainfrom
Draft
Conversation
Add unit tests that isolate the KV-cache-block trie invariant violation behind the cascade-prune assertion seen in NVBugs 6104831. Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
a58f265 to
a873694
Compare
1 task
chienchunhung
added a commit
to chienchunhung/TensorRT-LLM
that referenced
this pull request
Apr 30, 2026
…rmanent wedge Document the multi-signature disaggregated-serving wedge surfaced by the rc11 deployment. The report covers the 1P1D reproducer harness, the six labelled failure signatures (sender-side broken-promise after ready, trie cascade-prune assertion, decode-side bad optional access, gen-side checkGenTransferStatus blocking on at_least_num=1, receiver-side queued cancel broken-promise, and the suspected control-path send stall), their mapping to chained test/fix PR pairs (NVIDIA#13571/NVIDIA#13572 for sig NVIDIA#2, NVIDIA#13639/NVIDIA#13640 for sig #1), the in-flight fixes for sig NVIDIA#4 and sig NVIDIA#5, and the relationship to the unrelated companion fixes NVIDIA#12718 and NVIDIA#13119 which are not in rc11. Includes an investigation timeline that explains why each signature surfaced only after the previous one was fixed, and a test-coverage analysis of why the existing unit and integration tests did not catch any of these bugs. Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com> Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@coderabbitai summary
Summary
Manifest a bug by introducing 4 new unit tests under
RadixBlockTreeTest. These tests deterministically reproduce thetemplatedTrie.h:249 cascade prune: parent did not find this node as a childassertion observed on the Dynamo 1P1D disagg deployment hang documented in NVBugs 6104831. Tests pass on rc7+ through currentmain— i.e., they pass because the assertion fires, i.e., errors thrown. Once the underlying fix lands, they must be flipped fromEXPECT_THROWtoEXPECT_NO_THROWto serve as the regression net.Root cause (high level)
KVCacheBlock::removeNextBlockcallsmLookupNode->clearNode(blockKey)to erase a child entry from the parent'smNextNodesmap but does not reset the orphaned child'smPrevNodeweak back-pointer. Any subsequent operation that empties the orphaned node and lets cascade-prune run (attachToLookupNode'sclearValue,detachFromLookupNode, orfreeBlockAndAllDescendants) walks back viamPrevNodeto a parent map that no longer contains the entry and fires the assertion. The lone production caller of this pattern is the re-keying block atWindowBlockManager::storeBlocks(kvCacheManager.cpp:2289-2297). The structural defect was introduced byf931f4e9e2(UnifiedBlockTree refactor, in rc7); rc11 is just when a real workload first hit the trigger sequence.Tests added (all
RadixBlockTreeTest::Regression_NVBugs6104831_*)DetachOrphanedBlockFiresAssertion— minimal direct repro: orphan viaremoveNextBlock, thendetachFromLookupNode. Isolates the trie-invariant violation.FreeBlockAndAllDescendantsOnOrphanedSubtree— same root cause via the literal bug-report stack trace (addSequence → … → freeBlockAndAllDescendants).StoreBlocksRekeyTriggersAssertion— mirrorskvCacheManager.cpp:2289-2297verbatim:prev->removeNextBlock(oldKey); setBlockKey(newKey); searchRoot->addNextBlock(newKey, block).StressPrefixOverlappingInsertEvictReuseLoop— workload mirror with shared system prefix + per-request suffixes + periodicfreeBlockAndAllDescendants. Asserts the bug fires under workload-like operation order.PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.