vllm - ✅(Solved) Fix [Bug]: Scheduler deadlocks when request exceeds KV cache capacity but is within max_model_len [2 pull requests, 4 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#39734Fetched 2026-04-15 06:20:43
View on GitHub
Comments
4
Participants
4
Timeline
15
Reactions
1
Author
Timeline (top)
commented ×4referenced ×4cross-referenced ×3subscribed ×2

Error Message

  • Alternatively, vLLM should refuse to start when max_model_len exceeds KV cache capacity, or at least warn and clamp it.

Root Cause

The root cause is in the waiting request scheduling loop in vllm/v1/core/sched/scheduler.py. When scheduler_reserve_full_isl is True (the default), can_fit_full_sequence() returns False for a request that will never fit, and the scheduler breaks out of the loop without popping the request from the queue. On the next scheduling step, it encounters the same request, fails again, and breaks again. This causes head-of-line blocking of all waiting requests.

Fix Action

Fix / Workaround

============================== CPU Info

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 384 On-line CPU(s) list: 0-383 Vendor ID: AuthenticAMD Model name: AMD EPYC 9654 96-Core Processor CPU family: 25 Model: 17 Thread(s) per core: 2 Core(s) per socket: 96 Socket(s): 2 Stepping: 1 Frequency boost: enabled CPU(s) scaling MHz: 43% CPU max MHz: 3707.8120 CPU min MHz: 1500.0000 BogoMIPS: 4800.41 [56/1940] Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclm ulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bi talg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap Virtualization: AMD-V L1d cache: 6 MiB (192 instances) L1i cache: 6 MiB (192 instances) L2 cache: 192 MiB (192 instances) L3 cache: 768 MiB (24 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-95,192-287 NUMA node1 CPU(s): 96-191,288-383 Vulnerability Gather data sampling: Not affected Vulnerability Indirect target selection: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Mitigation; Safe RET Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsa: Vulnerable: No microcode Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

Workaround: Start the server with --no-scheduler-reserve-full-isl or set --max-model-len to match KV cache capacity.

PR fix notes

PR #1: [Scheduler] Abort requests that permanently exceed KV cache capacity

Description (problem / solution / changelog)

When scheduler_reserve_full_isl is enabled (default), a request whose token count exceeds total GPU KV cache capacity but fits within max_model_len causes permanent head-of-line blocking: can_fit_full_sequence returns False, the scheduler breaks without popping the request, and every subsequent schedule() call repeats this — starving all later requests.

Fix: add KVCacheManager.can_ever_fit_full_sequence() which compares the required blocks against total pool capacity instead of current free blocks. In the scheduling loop, when can_fit_full_sequence() returns False, call can_ever_fit_full_sequence(); if it also returns False the request can never be served so abort it immediately (FINISHED_ABORTED) and continue processing the queue. Memory-pressure cases (temporarily can't fit) retain existing break behavior.

Fixes: #39734

Changed files

  • tests/v1/core/test_reproduce_39734.py (added, +285/-0)
  • tests/v1/core/test_scheduler_kvcache_deadlock.py (added, +324/-0)
  • vllm/v1/core/kv_cache_manager.py (modified, +38/-0)
  • vllm/v1/core/sched/scheduler.py (modified, +22/-0)

PR #39828: [codex] Reject impossible waiting requests that exceed KV capacity

Description (problem / solution / changelog)

Summary

  • reject waiting requests that cannot fit even in an empty KV cache
  • continue scheduling later waiting requests instead of leaving the waiting queue stuck behind an impossible request
  • emit an explicit scheduler error output for the rejected request
  • add regression coverage for both scheduler_reserve_full_isl=True and scheduler_reserve_full_isl=False

Root cause

A waiting request whose prompt could never fit inside the engine's full KV cache stayed at the head of the waiting queue. The scheduler broke out of the waiting loop without rejecting that request, so later schedulable requests never got a chance to run.

Fixes #39734.

Why this is not duplicate work

  • checked the current discussion on issue #39734 on April 14, 2026
  • searched open PRs for 39734 and for KV cache capacity scheduler deadlock
  • did not find an existing open fix covering this waiting-queue rejection path

Testing

  • PYTHONPATH=$PWD .venv/bin/python -m pytest tests/v1/core/test_scheduler.py -k "test_schedule_rejects_waiting_request_exceeding_kv_capacity or test_schedule or test_stop_via_update_from_output" -v
  • git diff --check

AI assistance

This change was prepared with AI assistance, then reviewed and validated locally before submission.

Changed files

  • tests/v1/core/test_scheduler.py (modified, +61/-1)
  • vllm/v1/core/kv_cache_manager.py (modified, +37/-1)
  • vllm/v1/core/sched/scheduler.py (modified, +55/-8)

Code Example

Collecting environment information...             
==============================                  
        System Info                                                                                                                                                                                                                                                                              
==============================                                                                                                                                                                                                                                                                   
OS                           : Red Hat Enterprise Linux 9.6 (Plow) (x86_64)                                                                                                                                                                                                                      
GCC version                  : (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)                                                                                                                                                                                                                          
Clang version                : Could not collect                                                                                                
CMake version                : version 3.26.5 
Libc version                 : glibc-2.34                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                 
==============================                                                                                                                                                                                                                                                                   
       PyTorch Info                                                                                                                                                                                                                                                                              
==============================                                                                                                                                                                                                                                                                   
PyTorch version              : 2.11.0+cu130                                                                                                                                                                                                                                                      
Is debug build               : False                                                                                                                                                                                                                                                             
CUDA used to build PyTorch   : 13.0                                                                                                                                                                                                                                                              
ROCM used to build PyTorch   : N/A                                                                                                                                                                                                                                                               
                                                                                                                                                
==============================                                                                                                                  
      Python Environment                                                                                                                        
==============================                                                                                                                  
Python version               : 3.12.9 (main, Mar  9 2026, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (64-bit runtime)                   
Python platform              : Linux-5.14.0-570.98.1.el9_6.x86_64-x86_64-with-glibc2.34                                                         
                                                                                                                                                
==============================                                                                                                                  
       CUDA / GPU Info                                                                                                                          
==============================                                                                                                                  
Is CUDA available            : True                                                                                                                                                                                                                                                              
CUDA runtime version         : 13.0.88               
CUDA_MODULE_LOADING set to   :                                                                                                                  
GPU models and configuration :                                                                                                                  
GPU 0: NVIDIA H100 80GB HBM3                                                                                                                    
GPU 1: NVIDIA H100 80GB HBM3                                                                                                                    
GPU 2: NVIDIA H100 80GB HBM3                               
GPU 3: NVIDIA H100 80GB HBM3                            
GPU 4: NVIDIA H100 80GB HBM3  
GPU 5: NVIDIA H100 80GB HBM3   
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3  
                                                                        
Nvidia driver version        : 580.126.09
cuDNN version                : Could not collect
HIP runtime version          : N/A 
MIOpen runtime version       : N/A  
Is XNNPACK available         : True
                                                                        
============================== 
          CPU Info               
==============================  
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           52 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  384
On-line CPU(s) list:                     0-383
Vendor ID:                               AuthenticAMD
Model name:                              AMD EPYC 9654 96-Core Processor 
CPU family:                              25
Model:                                   17
Thread(s) per core:                      2
Core(s) per socket:                      96
Socket(s):                               2
Stepping:                                1
Frequency boost:                         enabled
CPU(s) scaling MHz:                      43%
CPU max MHz:                             3707.8120
CPU min MHz:                             1500.0000
BogoMIPS:                                4800.41                                                                                                                                                                                                                                        [56/1940]
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclm
ulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba
 perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 
clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bi
talg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap
Virtualization:                          AMD-V
L1d cache:                               6 MiB (192 instances)
L1i cache:                               6 MiB (192 instances)
L2 cache:                                192 MiB (192 instances)
L3 cache:                                768 MiB (24 instances)
NUMA node(s):                            2
NUMA node0 CPU(s):                       0-95,192-287
NUMA node1 CPU(s):                       96-191,288-383
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Mitigation; Safe RET
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Vulnerable: No microcode
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.7
[pip3] numpy==2.4.4
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cudnn-cu13==9.19.0.56
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.4.2
[pip3] nvidia-cutlass-dsl-libs-base==4.4.2
[pip3] nvidia-ml-py==13.595.45
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] pyzmq==27.1.0
[pip3] torch==2.11.0+cu130
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.11.0+cu130
[pip3] torchvision==0.26.0+cu130
[pip3] transformers==5.5.4
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.19.1rc1.dev221+g21fab0a3d (git sha: 21fab0a3d)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    NIC7    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    NODE    NODE    PIX     NODE    SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    NODE    NODE    NODE    PIX     SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    NODE    PIX     NODE    NODE    SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    PIX     NODE    NODE    NODE    SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    SYS     SYS     SYS     SYS     NODE    NODE    PIX     NODE    96-191,288-383  1               N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    SYS     SYS     SYS     SYS     NODE    NODE    NODE    PIX     96-191,288-383  1               N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    SYS     SYS     SYS     SYS     NODE    PIX     NODE    NODE    96-191,288-383  1               N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      SYS     SYS     SYS     SYS     PIX     NODE    NODE    NODE    96-191,288-383  1               N/A
NIC0    NODE    NODE    NODE    PIX     SYS     SYS     SYS     SYS      X      NODE    NODE    NODE    SYS     SYS     SYS     SYS
NIC1    NODE    NODE    PIX     NODE    SYS     SYS     SYS     SYS     NODE     X      NODE    NODE    SYS     SYS     SYS     SYS
NIC2    PIX     NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE     X      NODE    SYS     SYS     SYS     SYS
NIC3    NODE    PIX     NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE     X      SYS     SYS     SYS     SYS
NIC4    SYS     SYS     SYS     SYS     NODE    NODE    NODE    PIX     SYS     SYS     SYS     SYS      X      NODE    NODE    NODE
NIC5    SYS     SYS     SYS     SYS     NODE    NODE    PIX     NODE    SYS     SYS     SYS     SYS     NODE     X      NODE    NODE
NIC6    SYS     SYS     SYS     SYS     PIX     NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE     X      NODE
NIC7    SYS     SYS     SYS     SYS     NODE    PIX     NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE     X 

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_6
  NIC7: mlx5_7

==============================
     Environment Variables
==============================
MAX_JOBS=24
LD_LIBRARY_PATH=:/usr/local/cuda-13.0/lib64:/usr/local/cuda-13.0/lib64
CUDA_HOME=/usr/local/cuda-13.0
CUDA_HOME=/usr/local/cuda-13.0
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_bbrowning
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Collecting environment information...             
==============================                  
        System Info                                                                                                                                                                                                                                                                              
==============================                                                                                                                                                                                                                                                                   
OS                           : Red Hat Enterprise Linux 9.6 (Plow) (x86_64)                                                                                                                                                                                                                      
GCC version                  : (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)                                                                                                                                                                                                                          
Clang version                : Could not collect                                                                                                
CMake version                : version 3.26.5 
Libc version                 : glibc-2.34                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                 
==============================                                                                                                                                                                                                                                                                   
       PyTorch Info                                                                                                                                                                                                                                                                              
==============================                                                                                                                                                                                                                                                                   
PyTorch version              : 2.11.0+cu130                                                                                                                                                                                                                                                      
Is debug build               : False                                                                                                                                                                                                                                                             
CUDA used to build PyTorch   : 13.0                                                                                                                                                                                                                                                              
ROCM used to build PyTorch   : N/A                                                                                                                                                                                                                                                               
                                                                                                                                                
==============================                                                                                                                  
      Python Environment                                                                                                                        
==============================                                                                                                                  
Python version               : 3.12.9 (main, Mar  9 2026, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (64-bit runtime)                   
Python platform              : Linux-5.14.0-570.98.1.el9_6.x86_64-x86_64-with-glibc2.34                                                         
                                                                                                                                                
==============================                                                                                                                  
       CUDA / GPU Info                                                                                                                          
==============================                                                                                                                  
Is CUDA available            : True                                                                                                                                                                                                                                                              
CUDA runtime version         : 13.0.88               
CUDA_MODULE_LOADING set to   :                                                                                                                  
GPU models and configuration :                                                                                                                  
GPU 0: NVIDIA H100 80GB HBM3                                                                                                                    
GPU 1: NVIDIA H100 80GB HBM3                                                                                                                    
GPU 2: NVIDIA H100 80GB HBM3                               
GPU 3: NVIDIA H100 80GB HBM3                            
GPU 4: NVIDIA H100 80GB HBM3  
GPU 5: NVIDIA H100 80GB HBM3   
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3  
                                                                        
Nvidia driver version        : 580.126.09
cuDNN version                : Could not collect
HIP runtime version          : N/A 
MIOpen runtime version       : N/A  
Is XNNPACK available         : True
                                                                        
============================== 
          CPU Info               
==============================  
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           52 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  384
On-line CPU(s) list:                     0-383
Vendor ID:                               AuthenticAMD
Model name:                              AMD EPYC 9654 96-Core Processor 
CPU family:                              25
Model:                                   17
Thread(s) per core:                      2
Core(s) per socket:                      96
Socket(s):                               2
Stepping:                                1
Frequency boost:                         enabled
CPU(s) scaling MHz:                      43%
CPU max MHz:                             3707.8120
CPU min MHz:                             1500.0000
BogoMIPS:                                4800.41                                                                                                                                                                                                                                        [56/1940]
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclm
ulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba
 perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 
clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bi
talg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap
Virtualization:                          AMD-V
L1d cache:                               6 MiB (192 instances)
L1i cache:                               6 MiB (192 instances)
L2 cache:                                192 MiB (192 instances)
L3 cache:                                768 MiB (24 instances)
NUMA node(s):                            2
NUMA node0 CPU(s):                       0-95,192-287
NUMA node1 CPU(s):                       96-191,288-383
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Mitigation; Safe RET
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Vulnerable: No microcode
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.7
[pip3] numpy==2.4.4
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cudnn-cu13==9.19.0.56
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.4.2
[pip3] nvidia-cutlass-dsl-libs-base==4.4.2
[pip3] nvidia-ml-py==13.595.45
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] pyzmq==27.1.0
[pip3] torch==2.11.0+cu130
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.11.0+cu130
[pip3] torchvision==0.26.0+cu130
[pip3] transformers==5.5.4
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.19.1rc1.dev221+g21fab0a3d (git sha: 21fab0a3d)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    NIC7    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    NODE    NODE    PIX     NODE    SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    NODE    NODE    NODE    PIX     SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    NODE    PIX     NODE    NODE    SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    PIX     NODE    NODE    NODE    SYS     SYS     SYS     SYS     0-95,192-287    0               N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    SYS     SYS     SYS     SYS     NODE    NODE    PIX     NODE    96-191,288-383  1               N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    SYS     SYS     SYS     SYS     NODE    NODE    NODE    PIX     96-191,288-383  1               N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    SYS     SYS     SYS     SYS     NODE    PIX     NODE    NODE    96-191,288-383  1               N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      SYS     SYS     SYS     SYS     PIX     NODE    NODE    NODE    96-191,288-383  1               N/A
NIC0    NODE    NODE    NODE    PIX     SYS     SYS     SYS     SYS      X      NODE    NODE    NODE    SYS     SYS     SYS     SYS
NIC1    NODE    NODE    PIX     NODE    SYS     SYS     SYS     SYS     NODE     X      NODE    NODE    SYS     SYS     SYS     SYS
NIC2    PIX     NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE     X      NODE    SYS     SYS     SYS     SYS
NIC3    NODE    PIX     NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE     X      SYS     SYS     SYS     SYS
NIC4    SYS     SYS     SYS     SYS     NODE    NODE    NODE    PIX     SYS     SYS     SYS     SYS      X      NODE    NODE    NODE
NIC5    SYS     SYS     SYS     SYS     NODE    NODE    PIX     NODE    SYS     SYS     SYS     SYS     NODE     X      NODE    NODE
NIC6    SYS     SYS     SYS     SYS     PIX     NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE     X      NODE
NIC7    SYS     SYS     SYS     SYS     NODE    PIX     NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE     X 

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_6
  NIC7: mlx5_7

==============================
     Environment Variables
==============================
MAX_JOBS=24
LD_LIBRARY_PATH=:/usr/local/cuda-13.0/lib64:/usr/local/cuda-13.0/lib64
CUDA_HOME=/usr/local/cuda-13.0
CUDA_HOME=/usr/local/cuda-13.0
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_bbrowning
</details>

🐛 Describe the bug

When a request's token count exceeds the GPU KV cache capacity but is within the configured max_model_len, the request gets stuck at the head of the scheduler's waiting queue and blocks all other inference requests indefinitely. The server remains responsive to non-inference endpoints (e.g. /v1/models) but no generation occurs until the client times out and disconnects.

The root cause is in the waiting request scheduling loop in vllm/v1/core/sched/scheduler.py. When scheduler_reserve_full_isl is True (the default), can_fit_full_sequence() returns False for a request that will never fit, and the scheduler breaks out of the loop without popping the request from the queue. On the next scheduling step, it encounters the same request, fails again, and breaks again. This causes head-of-line blocking of all waiting requests.

This situation arises naturally with models like Gemma-4-31B that have high per-token KV cache costs (60 layers, large head dimensions). On 2x H100 80GB with TP=2, the KV cache only holds ~76k tokens while max_model_len defaults to 262k. Any request between 76k and 262k tokens triggers the deadlock.

Reproduction:

  1. Start vLLM with default settings for Gemma-4-31B-it on 2x H100 with TP=2:
vllm serve google/gemma-4-31B-it --tensor-parallel-size 2
  1. Confirm from startup logs that KV cache size is much smaller than max_model_len:
Using max model len 262144
GPU KV cache size: 76,640 tokens

3. Send a request with more tokens than KV cache size but fewer than max_model_len (e.g. ~100k tokens). 4. Observe the server logs showing "Waiting: 1 reqs, Running: 0 reqs" with zero throughput. All subsequent requests are also blocked. 5. The server only recovers when the blocked request is aborted (e.g. client timeout).

Workaround: Start the server with --no-scheduler-reserve-full-isl or set --max-model-len to match KV cache capacity.

There are a couple of potential fixes:

  • The scheduler should detect that a waiting request can never be admitted (it doesn't fit even with an empty cache) and reject it immediately instead of blocking the queue.
  • Alternatively, vLLM should refuse to start when max_model_len exceeds KV cache capacity, or at least warn and clamp it.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

The issue can be resolved by either setting --no-scheduler-reserve-full-isl when starting the server or adjusting --max-model-len to match the KV cache capacity, to prevent head-of-line blocking caused by requests that exceed the GPU KV cache capacity but are within the configured max model length.

Guidance

  • Identify the KV cache capacity and max model length configured for your vLLM server to understand the potential for this issue.
  • Consider implementing a check in the scheduler to reject requests that can never be admitted due to exceeding the KV cache capacity, preventing queue blocking.
  • As a temporary workaround, start the server with --no-scheduler-reserve-full-isl to bypass the scheduling issue.
  • Review model configurations and client request sizes to ensure they are within the capable range of the server's KV cache and max model length settings.

Example

No specific code example is provided as the solution involves configuration adjustments or potential code changes in the scheduler logic, which would require more detailed implementation specifics.

Notes

The provided information suggests that the issue is closely related to how the scheduler handles requests that exceed the KV cache capacity but are within the max model length. The exact fix might depend on the desired behavior when such requests are encountered (e.g., immediate rejection vs. waiting).

Recommendation

Apply the workaround by starting the server with --no-scheduler-reserve-full-isl to immediately address the blocking issue, while considering a more permanent solution that involves adjusting the scheduler's logic to handle such requests more efficiently.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING