Repository navigation
[Unified Tree] fix: exempt host-locked aux nodes from the sanity_check host-LRU check - #39980
Merged
alphabetc1 merged 1 commit intoSep 18, 2026
Merged
Conversation
alphabetc1
requested review from
Jialin,
Ying1123,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann and
yizhang2077
as code owners
September 17, 2026 14:44
alphabetc1
force-pushed
the
fix/sanity-host-locked-aux-lru
branch
from
September 18, 2026 01:20
b0b7f8c to
64b3d6d
Compare
alphabetc1
force-pushed
the
fix/sanity-host-locked-aux-lru
branch
from
September 18, 2026 01:25
64b3d6d to
6ee86da
Compare
Collaborator
Author
|
/rerun-group radix_cache/unified_radix_tree |
Contributor
|
Results for 🚀 🚀 🚀 🚀 🚀 |
ispobock
approved these changes
Sep 18, 2026
alphabetc1
enabled auto-merge (squash)
September 18, 2026 13:55
4 of 5 tasks
ishandhanani
added a commit
that referenced
this pull request
Sep 21, 2026
Picks up the host-locked aux-node exemption in sanity_check (#39980), the DSV4 rope pool names, and the HiCache transfer-argument documentation. The only conflict was the Mamba load-back test, which keeps main's argument annotations without the .squeeze() this branch removed when the binding started normalizing the request slot.
3 tasks done
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.
Motivation
sanity_checkraises while a storage-backup or load-back host lock is in flight.The aux (SWA / Mamba) host-lock acquire delists its node from the host LRU on the
0 -> 1transition and relists it on-> 0, so the eviction walker cannot pick anode whose host slice is being read.
sanity_checkdid not know about that: itrequired every host-only aux node to be in the host LRU, so any outstanding host
lock was reported as
<component> host LRU mismatch.SGLANG_ENABLE_TREE_CACHE_SANITY_CHECKdefaults to on in CI, andInvariantChecker._check_tree_cacheruns it for hybrid-SWA / hybrid-SSM models, soa HiCache backup in flight when the checker fires turns into an intermittent CI
failure that is not a product defect.
Modifications
Exempt nodes with
host_lock_ref > 0from the aux host-LRU membership comparison inboth tree cores. The exemption is two-sided on purpose: acquire delists a node, but a
node locked while already listed stays listed (eviction relists it at the device
tombstone), so both states are legal for a locked node.
The unlocked invariant is unchanged and still enforced -- an unlocked host-only value
missing from the LRU is still a violation
(
sanity_check_detects_a_host_only_value_missing_from_the_lru).sanity_check_detects_a_host_locked_value_missing_from_the_lruasserted the behaviourbeing removed, so it becomes the positive case and now shares the fixture helper with
its two siblings. No production behaviour changes; this is a diagnostic-only fix.
Accuracy Tests
cargo test --locked --lib: 867 passed, 0 failed, 1 ignored.test_unified_radix_cache_unittest.py: 1256 passed, 1435 skipped, 70 subtests.UnifiedRadixCacheat the tree API:sanity_checkpasses before, during and after an outstanding storage-backup hostlock (it raised during the lock before this change).
release / evict), 6 seeds x 150 steps for
full,full,swaandfull,swa,mamba:0 invariant violations in all three.
Checklist
🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ✅ Run #35295275230
Latest PR Test (Extra): ✅ Run #35295274985
Latest PR Test (AMD ROCm 10): ❌ Run #35295275311