vllm - ✅(Solved) Fix [Bug]: `prefix_caching_hash_algo='xxhash'` without `xxhash` installed cause `generate()` returns outputs with empty content, no exception [2 pull requests, 1 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#39338Fetched 2026-04-09 07:51:49
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1

Error Message

When xxhash is not installed and prefix_caching_hash_algo='xxhash' is set, LLM.generate() returns finished objects with empty content for the failed requests, without raising any exception. 2 '' error 3 '' error 4 '' error 5 '' error 6 '' error Exception raised, but no exception raised to the caller of LLM.generate() 2. LLM.generate() raises a Python exception when any submitted request fails preprocessing.

Fix Action

Fix / Workaround

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

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 24 On-line CPU(s) list: 0-23 Vendor ID: GenuineIntel Model name: 13th Gen Intel(R) Core(TM) i7-13700F CPU family: 6 Model: 183 Thread(s) per core: 2 Core(s) per socket: 16 Socket(s): 1 Stepping: 1 CPU(s) scaling MHz: 43% CPU max MHz: 5200.0000 CPU min MHz: 800.0000 BogoMIPS: 4224.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 640 KiB (16 instances) L1i cache: 768 KiB (16 instances) L2 cache: 24 MiB (10 instances) L3 cache: 30 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-23 Vulnerability Gather data sampling: Not affected Vulnerability Ghostwrite: 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: Mitigation; Clear Register File Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected 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; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S Vulnerability Srbds: Not affected Vulnerability Tsa: Not affected Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

PR fix notes

PR #39355: fix: raise ImportError early when xxhash is unavailable for prefix caching

Description (problem / solution / changelog)

Summary

Fixes #39338.

When prefix_caching_hash_algo is set to "xxhash" or "xxhash_cbor" but the xxhash package is not installed, LLM.generate() silently returns empty outputs for requests that trigger prefix caching — no exception is raised to the caller.

Root cause: The ModuleNotFoundError in vllm/utils/hashing.py is raised at hash-computation time during request preprocessing, where it gets caught as a preprocessing failure and silently converted to an empty output.

Fix: Validate xxhash availability in CacheConfig.__post_init__ so the error surfaces immediately at engine construction time, consistent with how other optional-dependency configs (e.g. mamba stochastic rounding) are validated.

Changes

  • vllm/config/cache.py: Add xxhash import check in __post_init__
  • tests/v1/engine/test_engine_args.py: Add parametrized test that mocks xxhash absence and verifies ImportError is raised

Test plan

  • New unit test: test_xxhash_missing_raises_import_error (parametrized for both xxhash and xxhash_cbor)
  • Verify manually: pip uninstall xxhash && python -c "from vllm.config.cache import CacheConfig; CacheConfig(prefix_caching_hash_algo='xxhash')"ImportError

Changed files

  • .buildkite/.pipeline_gen_v2 (added, +0/-0)
  • .buildkite/check-wheel-size.py (added, +53/-0)
  • .buildkite/ci_config.yaml (added, +25/-0)
  • .buildkite/ci_config_intel.yaml (added, +23/-0)
  • .buildkite/hardware_tests/amd.yaml (added, +22/-0)
  • .buildkite/hardware_tests/ascend_npu.yaml (added, +10/-0)
  • .buildkite/hardware_tests/cpu.yaml (added, +110/-0)
  • .buildkite/hardware_tests/gh200.yaml (added, +10/-0)
  • .buildkite/hardware_tests/intel.yaml (added, +17/-0)
  • .buildkite/image_build/image_build.sh (added, +255/-0)
  • .buildkite/image_build/image_build.yaml (added, +58/-0)
  • .buildkite/image_build/image_build_cpu.sh (added, +34/-0)
  • .buildkite/image_build/image_build_cpu_arm64.sh (added, +33/-0)
  • .buildkite/image_build/image_build_hpu.sh (added, +34/-0)
  • .buildkite/image_build/image_build_xpu.sh (added, +34/-0)
  • .buildkite/intel_jobs/test-intel.yaml (added, +64/-0)
  • .buildkite/lm-eval-harness/configs/DeepSeek-V2-Lite-Chat.yaml (added, +13/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-70B-Instruct-FBGEMM-nonuniform.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-70B-Instruct.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct-Channelwise-compressed-tensors.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct-FBGEMM-nonuniform.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct-FP8-compressed-tensors.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct-FP8.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct-INT8-compressed-tensors-asym.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct-INT8-compressed-tensors.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct-nonuniform-compressed-tensors.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-Instruct.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3-8B-QQQ.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3.2-1B-Instruct-FP8-compressed-tensors.yaml (added, +11/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-3.2-1B-Instruct-INT8-compressed-tensors.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-4-Maverick-17B-128E-Instruct-FP8-MM.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Meta-Llama-4-Maverick-17B-128E-Instruct-FP8.yaml (added, +14/-0)
  • .buildkite/lm-eval-harness/configs/Minitron-4B-Base-FP8.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Mixtral-8x22B-Instruct-v0.1-FP8-Dynamic.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Mixtral-8x7B-Instruct-v0.1-FP8.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Mixtral-8x7B-Instruct-v0.1.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16.yaml (added, +15/-0)
  • .buildkite/lm-eval-harness/configs/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8.yaml (added, +19/-0)
  • .buildkite/lm-eval-harness/configs/Qwen1.5-MoE-W4A16-compressed-tensors.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Qwen2-1.5B-Instruct-FP8W8.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Qwen2-1.5B-Instruct-INT8-compressed-tensors.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Qwen2-57B-A14-Instruct.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Qwen2.5-1.5B-Instruct.yaml (added, +11/-0)
  • .buildkite/lm-eval-harness/configs/Qwen2.5-VL-3B-Instruct-FP8-dynamic.yaml (added, +15/-0)
  • .buildkite/lm-eval-harness/configs/Qwen2.5-VL-7B-Instruct.yaml (added, +12/-0)
  • .buildkite/lm-eval-harness/configs/Qwen3-235B-A22B-Instruct-2507-FP8.yaml (added, +17/-0)
  • .buildkite/lm-eval-harness/configs/models-large-hopper.txt (added, +2/-0)
  • .buildkite/lm-eval-harness/configs/models-large-rocm-fp8.txt (added, +1/-0)
  • .buildkite/lm-eval-harness/configs/models-large-rocm.txt (added, +1/-0)
  • .buildkite/lm-eval-harness/configs/models-large.txt (added, +6/-0)
  • .buildkite/lm-eval-harness/configs/models-mm-large-h100.txt (added, +1/-0)
  • .buildkite/lm-eval-harness/configs/models-mm-small.txt (added, +1/-0)
  • .buildkite/lm-eval-harness/configs/models-small-rocm.txt (added, +6/-0)
  • .buildkite/lm-eval-harness/configs/models-small.txt (added, +6/-0)
  • .buildkite/lm-eval-harness/conftest.py (added, +44/-0)
  • .buildkite/lm-eval-harness/run-lm-eval-chartqa-vllm-vlm-baseline.sh (added, +44/-0)
  • .buildkite/lm-eval-harness/run-lm-eval-gsm-hf-baseline.sh (added, +46/-0)
  • .buildkite/lm-eval-harness/run-lm-eval-gsm-vllm-baseline.sh (added, +51/-0)
  • .buildkite/lm-eval-harness/run-lm-eval-mmlupro-vllm-baseline.sh (added, +47/-0)
  • .buildkite/lm-eval-harness/test_lm_eval_correctness.py (added, +145/-0)
  • .buildkite/performance-benchmarks/README.md (added, +180/-0)
  • .buildkite/performance-benchmarks/performance-benchmarks-descriptions.md (added, +65/-0)
  • .buildkite/performance-benchmarks/scripts/compare-json-results.py (added, +1327/-0)
  • .buildkite/performance-benchmarks/scripts/convert-results-json-to-markdown.py (added, +414/-0)
  • .buildkite/performance-benchmarks/scripts/launch-server.sh (added, +224/-0)
  • .buildkite/performance-benchmarks/scripts/run-performance-benchmarks.sh (added, +896/-0)
  • .buildkite/performance-benchmarks/tests/genai-perf-tests.json (added, +21/-0)
  • .buildkite/performance-benchmarks/tests/latency-tests-arm64-cpu.json (added, +26/-0)
  • .buildkite/performance-benchmarks/tests/latency-tests-cpu.json (added, +26/-0)
  • .buildkite/performance-benchmarks/tests/latency-tests-hpu.json (added, +106/-0)
  • .buildkite/performance-benchmarks/tests/latency-tests.json (added, +32/-0)
  • .buildkite/performance-benchmarks/tests/nightly-tests.json (added, +311/-0)
  • .buildkite/performance-benchmarks/tests/serving-tests-arm64-cpu.json (added, +131/-0)
  • .buildkite/performance-benchmarks/tests/serving-tests-cpu-asr.json (added, +38/-0)
  • .buildkite/performance-benchmarks/tests/serving-tests-cpu-embed.json (added, +41/-0)
  • .buildkite/performance-benchmarks/tests/serving-tests-cpu-text.json (added, +356/-0)
  • .buildkite/performance-benchmarks/tests/serving-tests-cpu.json (added, +143/-0)
  • .buildkite/performance-benchmarks/tests/serving-tests-hpu.json (added, +163/-0)
  • .buildkite/performance-benchmarks/tests/serving-tests.json (added, +77/-0)
  • .buildkite/performance-benchmarks/tests/throughput-tests-arm64-cpu.json (added, +27/-0)
  • .buildkite/performance-benchmarks/tests/throughput-tests-cpu.json (added, +27/-0)
  • .buildkite/performance-benchmarks/tests/throughput-tests-hpu.json (added, +123/-0)
  • .buildkite/performance-benchmarks/tests/throughput-tests.json (added, +35/-0)
  • .buildkite/release-pipeline.yaml (added, +698/-0)
  • .buildkite/scripts/annotate-release.sh (added, +119/-0)
  • .buildkite/scripts/annotate-rocm-release.sh (added, +113/-0)
  • .buildkite/scripts/cache-rocm-base-wheels.sh (added, +131/-0)
  • .buildkite/scripts/check-ray-compatibility.sh (added, +235/-0)
  • .buildkite/scripts/cherry-pick-from-milestone.sh (added, +242/-0)
  • .buildkite/scripts/ci-clean-log.sh (added, +17/-0)
  • .buildkite/scripts/cleanup-nightly-builds.sh (added, +130/-0)
  • .buildkite/scripts/generate-and-upload-nightly-index.sh (added, +84/-0)
  • .buildkite/scripts/generate-nightly-index.py (added, +468/-0)
  • .buildkite/scripts/hardware_ci/run-amd-test.sh (added, +498/-0)
  • .buildkite/scripts/hardware_ci/run-cpu-compatibility-test.sh (added, +65/-0)
  • .buildkite/scripts/hardware_ci/run-cpu-distributed-smoke-test.sh (added, +44/-0)
  • .buildkite/scripts/hardware_ci/run-cpu-test-arm.sh (added, +73/-0)
  • .buildkite/scripts/hardware_ci/run-cpu-test-ppc64le.sh (added, +54/-0)
  • .buildkite/scripts/hardware_ci/run-cpu-test-s390x.sh (added, +13/-0)
  • .buildkite/scripts/hardware_ci/run-cpu-test.sh (added, +20/-0)

PR #39786: [Bugfix] Raise ImportError early when xxhash is unavailable for prefix caching

Description (problem / solution / changelog)

Summary

Fixes #39785 (originally #39338).

When prefix_caching_hash_algo is set to "xxhash" or "xxhash_cbor" but the xxhash package is not installed, LLM.generate() silently returns empty outputs for requests that trigger prefix caching — no exception is raised.

Root cause: The ModuleNotFoundError in vllm/utils/hashing.py is raised at hash-computation time during request preprocessing, where it gets caught as a preprocessing failure and silently converted to an empty output.

Fix: Validate xxhash availability in CacheConfig.__post_init__ so the error surfaces immediately at engine construction time, consistent with how other optional-dependency configs (e.g. mamba stochastic rounding) are validated.

Uses ModuleNotFoundError with e.name == "xxhash" check to avoid masking broken/outdated installations that raise different ImportError subclasses.

Changes

  • vllm/config/cache.py: Add xxhash import check in __post_init__ (+13 LOC)
  • tests/v1/engine/test_xxhash_validation.py: Parametrized test that mocks xxhash absence and verifies ImportError is raised (+25 LOC)

Test plan

  • New unit test: test_xxhash_missing_raises_import_error (parametrized for both xxhash and xxhash_cbor)
  • Verify manually: pip uninstall xxhash && python -c "from vllm.config.cache import CacheConfig; CacheConfig(prefix_caching_hash_algo='xxhash')"ImportError

Changed files

  • tests/v1/engine/test_xxhash_validation.py (added, +60/-0)
  • vllm/config/cache.py (modified, +22/-0)

Code Example

Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 24.04.4 LTS (x86_64)
GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version                : 15.0.0 (git@github.com:llvm/llvm-project.git 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137)
CMake version                : version 3.28.3
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cu128
Is debug build               : False
CUDA used to build PyTorch   : 12.8
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 | packaged by conda-forge | (main, Mar  5 2026, 16:50:00) [GCC 14.3.0] (64-bit runtime)
Python platform              : Linux-6.14.0-37-generic-x86_64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : Could not collect
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : GPU 0: NVIDIA GeForce RTX 4070
Nvidia driver version        : 575.57.08
cuDNN version                : Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.7
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:                           39 bits physical, 48 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  24
On-line CPU(s) list:                     0-23
Vendor ID:                               GenuineIntel
Model name:                              13th Gen Intel(R) Core(TM) i7-13700F
CPU family:                              6
Model:                                   183
Thread(s) per core:                      2
Core(s) per socket:                      16
Socket(s):                               1
Stepping:                                1
CPU(s) scaling MHz:                      43%
CPU max MHz:                             5200.0000
CPU min MHz:                             800.0000
BogoMIPS:                                4224.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities
Virtualization:                          VT-x
L1d cache:                               640 KiB (16 instances)
L1i cache:                               768 KiB (16 instances)
L2 cache:                                24 MiB (10 instances)
L3 cache:                                30 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-23
Vulnerability Gather data sampling:      Not affected
Vulnerability Ghostwrite:                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:    Mitigation; Clear Register File
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
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; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.6
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[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-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu128
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.10.0+cu128
[pip3] torchvision==0.25.0+cu128
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.19.0
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
  	GPU0	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	0-23	0		N/A

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

==============================
     Environment Variables
==============================
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_fqin2

---

pip uninstall -y xxhash

---

import vllm

PROMPTS = [
    "The quick brown fox jumps over the lazy dog.",                      # short, succeeds
    "In a large language model, the transformer architecture uses self-attention to",  # short, succeeds
    "def fibonacci(n):\n    if n <= 1:\n        return n\n    return",   # long, silently dropped
    "The history of artificial intelligence began in antiquity, with myths, stories and rumors of artificial beings endowed with intelligence or consciousness by master craftsmen.",
    "one two three four five six seven eight nine ten " * 5,
    "在一个大型语言模型中,Transformer架构使用自注意力机制来处理输入序列中的每个标记。",
    "Given f(x) = 3x^2 + 2x - 5, find f'(x) and evaluate at x = 4. Step 1:",
]

llm = vllm.LLM(
    model="Qwen/Qwen3-0.6B",
    max_model_len=512,
    prefix_caching_hash_algo="xxhash",
    enforce_eager=True,
)
outputs = llm.generate(PROMPTS, vllm.SamplingParams(max_tokens=1, temperature=0.0))

for i, o in enumerate(outputs):
    print(i, repr(o.outputs[0].text), o.outputs[0].finish_reason)

---

0 ' The'     length
1 ' process' length
2 ''         error
3 ''         error
4 ''         error
5 ''         error
6 ''         error
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                           : Ubuntu 24.04.4 LTS (x86_64)
GCC version                  : (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Clang version                : 15.0.0 ([email protected]:llvm/llvm-project.git 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137)
CMake version                : version 3.28.3
Libc version                 : glibc-2.39

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cu128
Is debug build               : False
CUDA used to build PyTorch   : 12.8
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 | packaged by conda-forge | (main, Mar  5 2026, 16:50:00) [GCC 14.3.0] (64-bit runtime)
Python platform              : Linux-6.14.0-37-generic-x86_64-with-glibc2.39

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : Could not collect
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : GPU 0: NVIDIA GeForce RTX 4070
Nvidia driver version        : 575.57.08
cuDNN version                : Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.7
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:                           39 bits physical, 48 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  24
On-line CPU(s) list:                     0-23
Vendor ID:                               GenuineIntel
Model name:                              13th Gen Intel(R) Core(TM) i7-13700F
CPU family:                              6
Model:                                   183
Thread(s) per core:                      2
Core(s) per socket:                      16
Socket(s):                               1
Stepping:                                1
CPU(s) scaling MHz:                      43%
CPU max MHz:                             5200.0000
CPU min MHz:                             800.0000
BogoMIPS:                                4224.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities
Virtualization:                          VT-x
L1d cache:                               640 KiB (16 instances)
L1i cache:                               768 KiB (16 instances)
L2 cache:                                24 MiB (10 instances)
L3 cache:                                30 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-23
Vulnerability Gather data sampling:      Not affected
Vulnerability Ghostwrite:                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:    Mitigation; Clear Register File
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
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; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.6
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[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-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu128
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.10.0+cu128
[pip3] torchvision==0.25.0+cu128
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.19.0
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
  	GPU0	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	0-23	0		N/A

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

==============================
     Environment Variables
==============================
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_fqin2
</details>

🐛 Describe the bug

Describe the bug

When xxhash is not installed and prefix_caching_hash_algo='xxhash' is set, LLM.generate() returns finished objects with empty content for the failed requests, without raising any exception.

Reproduce

pip uninstall -y xxhash
import vllm

PROMPTS = [
    "The quick brown fox jumps over the lazy dog.",                      # short, succeeds
    "In a large language model, the transformer architecture uses self-attention to",  # short, succeeds
    "def fibonacci(n):\n    if n <= 1:\n        return n\n    return",   # long, silently dropped
    "The history of artificial intelligence began in antiquity, with myths, stories and rumors of artificial beings endowed with intelligence or consciousness by master craftsmen.",
    "one two three four five six seven eight nine ten " * 5,
    "在一个大型语言模型中,Transformer架构使用自注意力机制来处理输入序列中的每个标记。",
    "Given f(x) = 3x^2 + 2x - 5, find f'(x) and evaluate at x = 4. Step 1:",
]

llm = vllm.LLM(
    model="Qwen/Qwen3-0.6B",
    max_model_len=512,
    prefix_caching_hash_algo="xxhash",
    enforce_eager=True,
)
outputs = llm.generate(PROMPTS, vllm.SamplingParams(max_tokens=1, temperature=0.0))

for i, o in enumerate(outputs):
    print(i, repr(o.outputs[0].text), o.outputs[0].finish_reason)

Output:

0 ' The'     length
1 ' process' length
2 ''         error
3 ''         error
4 ''         error
5 ''         error
6 ''         error

Exception raised, but no exception raised to the caller of LLM.generate()

Expected

Either:

  1. LLM(prefix_caching_hash_algo='xxhash') raises ImportError at construction time when xxhash is not installed.
  2. LLM.generate() raises a Python exception when any submitted request fails preprocessing.

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

To fix the issue, either install the xxhash library or set a different prefix_caching_hash_algo that is installed, as the current setup silently fails when xxhash is not available.

Guidance

  • Verify if xxhash is installed by running pip show xxhash in your terminal. If it's not installed, install it using pip install xxhash.
  • Consider setting a different hashing algorithm for prefix_caching_hash_algo that is known to be installed, such as md5 or sha256, to avoid dependency on xxhash.
  • Review the documentation for vllm to understand the implications of different prefix_caching_hash_algo settings on performance and security.
  • If xxhash cannot be installed due to environment constraints, explore alternatives for achieving the desired functionality without relying on it.

Example

No specific code example is provided as the fix involves either installing a library or changing a configuration setting rather than modifying code.

Notes

The issue highlights the importance of handling dependencies and exceptions explicitly in the code to prevent silent failures. Ensuring that all required libraries are installed and configured correctly is crucial for the reliable operation of applications.

Recommendation

Apply a workaround by installing xxhash or changing the prefix_caching_hash_algo to an available alternative, as this directly addresses the root cause of the silent failure issue.

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