vllm - ✅(Solved) Fix [Bug] MultiConnector: NIXL transfers silently broken after HMA migration [1 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#36547Fetched 2026-04-08 00:36:18
View on GitHub
Comments
0
Participants
1
Timeline
11
Reactions
1
Author
Participants
Timeline (top)
referenced ×4mentioned ×2subscribed ×2closed ×1

Root Cause

NixlConnector implements SupportsHMA, so it only overrides request_finished_all_groups and does not override request_finished. MultiConnector does not implement SupportsHMA.

The scheduler dispatches based on SupportsHMA (scheduler.py#L1972-L1980):

if not isinstance(self.connector, SupportsHMA):
    assert len(self.kv_cache_config.kv_cache_groups) == 1
    return self.connector.request_finished(request, block_ids[0])
return self.connector.request_finished_all_groups(request, block_ids)

Without MultiConnector (works):

Scheduler
  isinstance(NixlConnector, SupportsHMA) -> True
  -> NixlConnector.request_finished_all_groups(request, block_ids)
  -> returns {do_remote_prefill: True, remote_block_ids: [...], ...}

With MultiConnector (broken):

MultiConnector is not SupportsHMA, so the scheduler calls request_finished. MultiConnector.request_finished iterates sub-connectors (multi_connector.py#L388-L396):

for c in self._connectors:
    async_save, txfer_params = c.request_finished(request, blocks)

When c is NixlConnector, this resolves to KVConnectorBase_V1.request_finished (base.py#L497-L516) which returns (False, None). No kv_transfer_params is generated, the proxy has nothing to forward, and the decode server never receives do_remote_prefill: True.

This became an issue after NixlConnector adopted SupportsHMA (#35758). MultiConnector was not updated to handle the new HMA dispatch path.

Fix Action

Fix / Workaround

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

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 160 On-line CPU(s) list: 0-159 Vendor ID: GenuineIntel Model name: Intel Xeon Processor (SapphireRapids) CPU family: 6 Model: 143 Thread(s) per core: 2 Core(s) per socket: 40 Socket(s): 2 Stepping: 4 BogoMIPS: 4200.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities Virtualization: VT-x Hypervisor vendor: KVM Virtualization type: full L1d cache: 5 MiB (160 instances) L1i cache: 5 MiB (160 instances) L2 cache: 320 MiB (80 instances) L3 cache: 32 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-79 NUMA node1 CPU(s): 80-159 Vulnerability Gather data sampling: Not affected Vulnerability Indirect target selection: Mitigation; Aligned branch/return thunks Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Unknown: No mitigations Vulnerability Reg file data sampling: Not affected 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; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop Vulnerability Srbds: Not affected Vulnerability Tsa: Not affected Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Not affected

The scheduler dispatches based on SupportsHMA (scheduler.py#L1972-L1980):

This became an issue after NixlConnector adopted SupportsHMA (#35758). MultiConnector was not updated to handle the new HMA dispatch path.

PR fix notes

PR #36549: [Bugfix][MultiConnector] Fix MultiConnector for SupportsHMA sub-connectors

Description (problem / solution / changelog)

Summary

Fixes #36547

MultiConnector.request_finished calls c.request_finished() on all sub-connectors, but NixlConnector (SupportsHMA) only overrides request_finished_all_groups. The call falls through to the base class no-op, so kv_transfer_params is never generated and NIXL transfers silently fail.

Fix: Check if sub-connector implements SupportsHMA and dispatch to request_finished_all_groups accordingly.

Test plan

See #36547 for reproduction steps, test script, and detailed output. Validated with a 2-GPU prefill/decode setup using Qwen/Qwen3-0.6B.

Test result (Are CI test cases needed for this?)

Before fix:

  • external_kv_transfer = 0 after proxy request (NIXL never fires)
  • All prompt tokens fall back to local_compute

After fix:

  • external_kv_transfer = 38 (all prompt tokens transferred via NIXL)
  • local_compute = 1 (only the recomputed last token)

<details> <summary> Essential Elements of an Effective PR Description Checklist </summary>
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.
</details>

Changed files

  • vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py (modified, +8/-0)

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.10.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, Aug 14 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (64-bit runtime)
Python platform              : Linux-5.14.0-570.73.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        : 590.48.01
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:                           46 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  160
On-line CPU(s) list:                     0-159
Vendor ID:                               GenuineIntel
Model name:                              Intel Xeon Processor (SapphireRapids)
CPU family:                              6
Model:                                   143
Thread(s) per core:                      2
Core(s) per socket:                      40
Socket(s):                               2
Stepping:                                4
BogoMIPS:                                4200.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities
Virtualization:                          VT-x
Hypervisor vendor:                       KVM
Virtualization type:                     full
L1d cache:                               5 MiB (160 instances)
L1i cache:                               5 MiB (160 instances)
L2 cache:                                320 MiB (80 instances)
L3 cache:                                32 MiB (2 instances)
NUMA node(s):                            2
NUMA node0 CPU(s):                       0-79
NUMA node1 CPU(s):                       80-159
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Mitigation; Aligned branch/return thunks
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Unknown: No mitigations
Vulnerability Reg file data sampling:    Not affected
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; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.4
[pip3] numpy==2.2.6
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-cu13==9.15.1.9
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.4.1
[pip3] nvidia-cutlass-dsl-libs-base==4.4.1
[pip3] nvidia-ml-py==13.590.48
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu130
[pip3] torchaudio==2.10.0+cu130
[pip3] torchvision==0.25.0+cu130
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.16.1rc1.dev59+g876312f0b (git sha: 876312f0b)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    0-79    0               N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    0-79    0               N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    0-79    0               N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    0-79    0               N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    80-159  1               N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    80-159  1               N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    80-159  1               N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      80-159  1               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
==============================
LD_LIBRARY_PATH=:/usr/local/cuda-13.0/lib64:/usr/local/cuda-13.0/lib64:/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_ZhanqiuHu

---

$ CUDA_VISIBLE_DEVICES=5,6 python run_minimal_bug_demo.py

Starting servers  prefill=GPU 5  decode=GPU 6
  ✔ prefill ready
  ✔ decode ready
  ✔ proxy ready

────────────────────────────────────────────────────────────
Proxy correctness (output matches prefill)
────────────────────────────────────────────────────────────
  proxy  -> '1000 km². The capital of Italy is 1000 km².'  (6 tokens)
  prefill-> '1000 km². The capital of Italy is 1000 km².'  (6 tokens)
PASS

────────────────────────────────────────────────────────────
Cold decode via proxy (NIXL should transfer all tokens)
────────────────────────────────────────────────────────────
  📊 metrics delta  compute=+38
  proxy  -> ' the demand for skilled professionals in these fields has increased significantl'  (38 tokens)
  prefill-> ' the demand for skilled professionals in these fields has increased significantl'
  ℹ expect: ext_kv=38, compute=1, cache_hit=0
FAIL   expected external_kv_transfer == 38, got 0.0

────────────────────────────────────────────────────────────
Direct decode, no proxy (control)
────────────────────────────────────────────────────────────
  📊 metrics delta  compute=+6
  decode -> ' 3.00 × 10^8 m/s. What is the distance in meters'  (6 tokens)
  ℹ expect: compute=6, ext_kv=0, cache_hit=0
PASS

════════════════════════════════════════════════════════════
📊 Decode server cumulative metrics:
  local_compute               50 tokens
  local_cache_hit              0 tokens
  external_kv_transfer         0 tokens  <- NIXL never used!

Results:  2 passed  1 failed  / 3 total

SOME TESTS FAILED

---

if not isinstance(self.connector, SupportsHMA):
    assert len(self.kv_cache_config.kv_cache_groups) == 1
    return self.connector.request_finished(request, block_ids[0])
return self.connector.request_finished_all_groups(request, block_ids)

---

Scheduler
  isinstance(NixlConnector, SupportsHMA) -> True
  -> NixlConnector.request_finished_all_groups(request, block_ids)
  -> returns {do_remote_prefill: True, remote_block_ids: [...], ...}

---

for c in self._connectors:
    async_save, txfer_params = c.request_finished(request, blocks)

---

+    def request_finished(
+        self,
+        request: "Request",
+        block_ids: list[int],
+    ) -> tuple[bool, dict[str, Any] | None]:
+        assert self.connector_scheduler is not None
+        return self.connector_scheduler.request_finished(request, (block_ids,))
+
     def request_finished_all_groups(
         self,
         request: "Request",
         block_ids: tuple[list[int], ...],
     ) -> tuple[bool, dict[str, Any] | None]:
         assert self.connector_scheduler is not None
         return self.connector_scheduler.request_finished(request, block_ids)

---

def request_finished(
         self,
         request: "Request",
         blocks: list[int],
     ) -> tuple[bool, dict[str, Any] | None]:
         async_saves = 0
         kv_txfer_params = None
         for c in self._connectors:
-            async_save, txfer_params = c.request_finished(request, blocks)
+            if isinstance(c, SupportsHMA):
+                async_save, txfer_params = c.request_finished_all_groups(
+                    request, (blocks,))
+            else:
+                async_save, txfer_params = c.request_finished(request, blocks)

---

def request_finished(
         self,
         request: "Request",
         block_ids: list[int],
     ) -> tuple[bool, dict[str, Any] | None]:
-        return False, None
+        if isinstance(self, SupportsHMA):
+            return self.request_finished_all_groups(request, (block_ids,))
+        return False, None
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.10.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, Aug 14 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (64-bit runtime)
Python platform              : Linux-5.14.0-570.73.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        : 590.48.01
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:                           46 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  160
On-line CPU(s) list:                     0-159
Vendor ID:                               GenuineIntel
Model name:                              Intel Xeon Processor (SapphireRapids)
CPU family:                              6
Model:                                   143
Thread(s) per core:                      2
Core(s) per socket:                      40
Socket(s):                               2
Stepping:                                4
BogoMIPS:                                4200.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd arat vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities
Virtualization:                          VT-x
Hypervisor vendor:                       KVM
Virtualization type:                     full
L1d cache:                               5 MiB (160 instances)
L1i cache:                               5 MiB (160 instances)
L2 cache:                                320 MiB (80 instances)
L3 cache:                                32 MiB (2 instances)
NUMA node(s):                            2
NUMA node0 CPU(s):                       0-79
NUMA node1 CPU(s):                       80-159
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Mitigation; Aligned branch/return thunks
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Unknown: No mitigations
Vulnerability Reg file data sampling:    Not affected
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; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.4
[pip3] numpy==2.2.6
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-cu13==9.15.1.9
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-cufile-cu12==1.13.1.3
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.4.1
[pip3] nvidia-cutlass-dsl-libs-base==4.4.1
[pip3] nvidia-ml-py==13.590.48
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvshmem-cu12==3.4.5
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu130
[pip3] torchaudio==2.10.0+cu130
[pip3] torchvision==0.25.0+cu130
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.16.1rc1.dev59+g876312f0b (git sha: 876312f0b)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    0-79    0               N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    0-79    0               N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    0-79    0               N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    0-79    0               N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    80-159  1               N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    80-159  1               N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    80-159  1               N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      80-159  1               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
==============================
LD_LIBRARY_PATH=:/usr/local/cuda-13.0/lib64:/usr/local/cuda-13.0/lib64:/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_ZhanqiuHu
</details>

🐛 Describe the bug

Bug Description

When using MultiConnector(OffloadingConnector + NixlConnector) in a P/D disaggregated setup, NIXL remote KV transfers never occur. The decode server falls back to local compute for all prompt tokens. The external_kv_transfer Prometheus metric is always 0.

Output correctness is unaffected (temperature=0 produces identical text regardless of source), so the bug is invisible without metric validation.

Reproduction

Set up a prefill server, decode server, and proxy, all using MultiConnector(OffloadingConnector + NixlConnector). Send a request through the proxy and check the decode server's vllm:prompt_tokens_by_source_total{source="external_kv_transfer"} metric. It stays at 0.

We validated with 3 tests:

  1. Proxy correctness: Send a prompt through the proxy (prefill -> NIXL -> decode). Output matches prefill_direct. This passes because the bug is silent - decode recomputes everything locally and still gets the right answer.

  2. NIXL metric validation (the failing test): Send a fresh prompt through the proxy. The decode server has no cache, so NIXL should transfer all prompt tokens from prefill. We check the decode server's external_kv_transfer metric. Expected: equal to prompt token count. Got: 0. All tokens fell back to local_compute.

  3. Control (no proxy): Send a prompt directly to the decode server, bypassing the proxy entirely. No NIXL involved, all tokens are local_compute, external_kv_transfer = 0. Passes, confirming the metric itself works correctly.

<details> <summary><b>Test output (click to expand)</b></summary>
$ CUDA_VISIBLE_DEVICES=5,6 python run_minimal_bug_demo.py

⚙ Starting servers  prefill=GPU 5  decode=GPU 6
  ✔ prefill ready
  ✔ decode ready
  ✔ proxy ready

────────────────────────────────────────────────────────────
 ▶ Proxy correctness (output matches prefill)
────────────────────────────────────────────────────────────
  proxy  -> '1000 km². The capital of Italy is 1000 km².'  (6 tokens)
  prefill-> '1000 km². The capital of Italy is 1000 km².'  (6 tokens)
  ✔  PASS

────────────────────────────────────────────────────────────
 ▶ Cold decode via proxy (NIXL should transfer all tokens)
────────────────────────────────────────────────────────────
  📊 metrics delta  compute=+38
  proxy  -> ' the demand for skilled professionals in these fields has increased significantl'  (38 tokens)
  prefill-> ' the demand for skilled professionals in these fields has increased significantl'
  ℹ expect: ext_kv=38, compute=1, cache_hit=0
  ✘  FAIL   expected external_kv_transfer == 38, got 0.0

────────────────────────────────────────────────────────────
 ▶ Direct decode, no proxy (control)
────────────────────────────────────────────────────────────
  📊 metrics delta  compute=+6
  decode -> ' 3.00 × 10^8 m/s. What is the distance in meters'  (6 tokens)
  ℹ expect: compute=6, ext_kv=0, cache_hit=0
  ✔  PASS

════════════════════════════════════════════════════════════
📊 Decode server cumulative metrics:
  local_compute               50 tokens
  local_cache_hit              0 tokens
  external_kv_transfer         0 tokens  <- NIXL never used!

Results:  2 passed  1 failed  / 3 total

✘  SOME TESTS FAILED
</details>

Cause

NixlConnector implements SupportsHMA, so it only overrides request_finished_all_groups and does not override request_finished. MultiConnector does not implement SupportsHMA.

The scheduler dispatches based on SupportsHMA (scheduler.py#L1972-L1980):

if not isinstance(self.connector, SupportsHMA):
    assert len(self.kv_cache_config.kv_cache_groups) == 1
    return self.connector.request_finished(request, block_ids[0])
return self.connector.request_finished_all_groups(request, block_ids)

Without MultiConnector (works):

Scheduler
  isinstance(NixlConnector, SupportsHMA) -> True
  -> NixlConnector.request_finished_all_groups(request, block_ids)
  -> returns {do_remote_prefill: True, remote_block_ids: [...], ...}

With MultiConnector (broken):

MultiConnector is not SupportsHMA, so the scheduler calls request_finished. MultiConnector.request_finished iterates sub-connectors (multi_connector.py#L388-L396):

for c in self._connectors:
    async_save, txfer_params = c.request_finished(request, blocks)

When c is NixlConnector, this resolves to KVConnectorBase_V1.request_finished (base.py#L497-L516) which returns (False, None). No kv_transfer_params is generated, the proxy has nothing to forward, and the decode server never receives do_remote_prefill: True.

This became an issue after NixlConnector adopted SupportsHMA (#35758). MultiConnector was not updated to handle the new HMA dispatch path.

Proposed Fix

Three options, in order of scope:

Option A: Add request_finished shim to NixlConnector

Smallest diff. NixlConnector wraps single-group block IDs and delegates to its existing path.

nixl_connector.py#L405-L411:

+    def request_finished(
+        self,
+        request: "Request",
+        block_ids: list[int],
+    ) -> tuple[bool, dict[str, Any] | None]:
+        assert self.connector_scheduler is not None
+        return self.connector_scheduler.request_finished(request, (block_ids,))
+
     def request_finished_all_groups(
         self,
         request: "Request",
         block_ids: tuple[list[int], ...],
     ) -> tuple[bool, dict[str, Any] | None]:
         assert self.connector_scheduler is not None
         return self.connector_scheduler.request_finished(request, block_ids)

Option B: Fix MultiConnector.request_finished to handle HMA sub-connectors

multi_connector.py#L388-L396:

     def request_finished(
         self,
         request: "Request",
         blocks: list[int],
     ) -> tuple[bool, dict[str, Any] | None]:
         async_saves = 0
         kv_txfer_params = None
         for c in self._connectors:
-            async_save, txfer_params = c.request_finished(request, blocks)
+            if isinstance(c, SupportsHMA):
+                async_save, txfer_params = c.request_finished_all_groups(
+                    request, (blocks,))
+            else:
+                async_save, txfer_params = c.request_finished(request, blocks)

Option C: Default request_finished in base class delegates to request_finished_all_groups

base.py#L497-L516:

     def request_finished(
         self,
         request: "Request",
         block_ids: list[int],
     ) -> tuple[bool, dict[str, Any] | None]:
-        return False, None
+        if isinstance(self, SupportsHMA):
+            return self.request_finished_all_groups(request, (block_ids,))
+        return False, None

cc @NickLucche @orozery

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

Fix Plan

To fix the issue with NixlConnector and MultiConnector, we will implement the proposed fix. Here are the steps:

  • Option A: Add request_finished shim to NixlConnector
    1. Open the nixl_connector.py file and add the following code:

def request_finished( self, request: "Request", block_ids: list[int], ) -> tuple[bool, dict[str, Any] | None]: assert self.connector_scheduler is not None return self.connector_scheduler.request_finished(request, (block_ids,))

  2. Save the changes.

* **Option B: Fix `MultiConnector.request_finished` to handle HMA sub-connectors**
  1. Open the `multi_connector.py` file and modify the `request_finished` method as follows:
  ```python
def request_finished(
    self,
    request: "Request",
    blocks: list[int],
) -> tuple[bool, dict[str, Any] | None]:
    async_saves = 0
    kv_txfer_params = None
    for c in self._connectors:
        if isinstance(c, SupportsHMA):
            async_save, txfer_params = c.request_finished_all_groups(
                request, (blocks,))
        else:
            async_save, txfer_params = c.request_finished(request, blocks)
  1. Save the changes.
  • Option C: Default request_finished in base class delegates to request_finished_all_groups
    1. Open the base.py file and modify the request_finished method as follows:

def request_finished( self, request: "Request", block_ids: list[int], ) -> tuple[bool, dict[str, Any] | None]: if isinstance(self, SupportsHMA): return self.request_finished_all_groups(request, (block_ids,)) return False, None

  2. Save the changes.

### Verification
To verify that the fix worked, run the test cases again and check the `external_kv_transfer` metric. It should now be non-zero, indicating that NIXL remote KV transfers are occurring.

### Extra Tips
* Make sure to test the fix thoroughly to ensure that it does not introduce any new issues.
* Consider adding additional logging or debugging statements to help diagnose any future issues.
* If you choose to implement Option C, be aware that it may have implications for other connectors that do not support HMA.

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

vllm - ✅(Solved) Fix [Bug] MultiConnector: NIXL transfers silently broken after HMA migration [1 pull requests, 1 participants]