fix: tolerate no_compactable_groups skip in strict compaction mode#16
Open
yjl-001 wants to merge 1 commit into
Open
fix: tolerate no_compactable_groups skip in strict compaction mode#16yjl-001 wants to merge 1 commit into
yjl-001 wants to merge 1 commit into
Conversation
…n loop When vLLM V1 async scheduling causes the scheduler's KV estimate to lag behind the worker's actual block state, run_group_compaction_pipeline may find no compactable groups. Previously this was treated as a fatal error in strict mode, crashing the server. Changes: - Add 'no_compactable_groups' to allowed_strict_skip_reasons so the condition is treated as a benign skip rather than a fatal error - Set last_compression_step in mark_compression_skipped so the existing batch_queue_dedup guard can prevent tight retry loops Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
When running vLLM server with TriAttention runtime enabled, the server crashes after ~2000 decode steps with:
Root Cause
vLLM V1's async scheduling can cause the scheduler's estimated KV cache length to drift from the worker's actual block allocation state. When the scheduler signals compression but the worker finds all KV cache groups have empty block IDs or zero effective tokens,
run_group_compaction_pipelinereturnsno_compactable_groups. This benign race condition was treated as a fatal error because it wasn't in the allowed skip reasons set.The issue is in
triattention/vllm/runtime/runner.pyline 53:When
strict_no_downgradeis True (default), any skip reason not in_allowed_strict_skip_reasonsraises a fatalRuntimeError.Changes
runner.py: Add"no_compactable_groups"to_allowed_strict_skip_reasonsso the condition is treated as a benign skip rather than a fatal errorstate.py: Setlast_compression_stepinmark_compression_skipped()to enable the existingbatch_queue_dedupguard, preventing tight retry loops when a skip occurs on consecutive stepsVerification
The error was observed on a production vLLM 0.21.0 deployment with Qwen3-8B model,
TRIATTN_RUNTIME_KV_BUDGET=2048, handling 8 concurrent chat requests.🤖 Generated with Claude Code