Skip to content

[Bug]: vLLM looses all replies on scale down #1426

@eero-t

Description

@eero-t

Your current environment

The output of python collect_env.py
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version                : Could not collect
CMake version                : version 3.22.1
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.6.0+hpu_1.20.0-543.git4952fce
Is debug build               : False
CUDA used to build PyTorch   : None
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.10.12 (main, Feb  4 2025, 14:57:36) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-5.15.0-131-generic-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : False
CUDA runtime version         : No CUDA
CUDA_MODULE_LOADING set to   : N/A
GPU models and configuration : No CUDA
Nvidia driver version        : No CUDA
cuDNN version                : No CUDA
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):                               152
On-line CPU(s) list:                  0-151
Vendor ID:                            GenuineIntel
Model name:                           Intel(R) Xeon(R) Platinum 8368 CPU @ 2.40GHz
CPU family:                           6
Model:                                106
Thread(s) per core:                   2
Core(s) per socket:                   38
Socket(s):                            2
Stepping:                             6
CPU max MHz:                          3400.0000
CPU min MHz:                          800.0000
BogoMIPS:                             4800.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 pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            3.6 MiB (76 instances)
L1i cache:                            2.4 MiB (76 instances)
L2 cache:                             95 MiB (76 instances)
L3 cache:                             114 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0-37,76-113
NUMA node1 CPU(s):                    38-75,114-151
Vulnerability Gather data sampling:   Mitigation; Microcode
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Mitigation; Clear CPU buffers; SMT vulnerable
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 and seccomp
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 Tsx async abort:        Not affected

==============================
Versions of relevant libraries
==============================
[pip3] habana-torch-dataloader==1.20.0.543
[pip3] habana-torch-plugin==1.20.0.543
[pip3] numpy==1.26.4
[pip3] pynvml==8.0.4
[pip3] pytorch-lightning==2.5.0.post0
[pip3] pyzmq==26.4.0
[pip3] torch==2.6.0+hpu.1.20.0.543.git4952fce
[pip3] torch_tb_profiler==0.4.0
[pip3] torchaudio==2.6.0+cpu
[pip3] torchdata==0.10.1+cpu
[pip3] torchmetrics==1.6.2
[pip3] torchtext==0.18.0+cpu
[pip3] torchvision==0.21.0+cpu
[pip3] transformers==4.51.3
[pip3] triton==3.1.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
Neuron SDK Version           : N/A
vLLM Version                 : 0.6.6.post1
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
  Could not collect

==============================
     Environment Variables
==============================
LD_LIBRARY_PATH=/usr/local/lib/python3.10/dist-packages/cv2/../../lib64:/opt/habanalabs/libfabric-1.22.0/lib:/opt/amazon/openmpi/lib:/usr/lib/habanalabs:
TORCHINDUCTOR_CACHE_DIR=/tmp/pytorchinductor_cache

🐛 Describe the bug

This is with OPEA v1.3 Gaudi vLLM image build: https://hub.docker.com/layers/opea/vllm/1.3/images/sha256-f8ec360209d996c78e90ff90a9d0bdd21bc9ac4dc6e0b16a83200df9f3ee59de

Use-case

Scale down number of vLLM instances that serve stream requests at /v1/chat/completions

vLLM query (template)
{
	"model": "meta-llama/Meta-Llama-3-8B-Instruct",
	"messages": [{
		"role": "user",
		"content": "<QUERY>"
	}],
	"max_tokens": 256,
	"temperature": 0.01,
	"stream": true
}

Expected outcome

When signaled to exit (= SIGTERM), vLLM instance generates the remaining tokens for the currently active requests, closes their connections, and exits.

Actual outcome

vLLM logs following, and does not stream any additional tokens. It just freezes. until it gets forcibly terminated (= SIGKILL):

INFO 06-13 15:12:44 launcher.py:57] Shutting down FastAPI HTTP server.
INFO:     Shutting down
INFO:     Waiting for connections to close. (CTRL+C to force quit)

Notes

  • This happens even when there's just single active request and vLLM has streamed it already hundred(s) of tokens
  • This is with Gaudi vLLM is v6.6post version. No idea whether this happens also with latest upstream vLLM, which switched to new v1 engine in v0.8, and is currently at v0.9.1
  • Sometimes vLLM breaks connections immediately on SIGTERM, and exits:
INFO 06-12 16:56:12 launcher.py:57] Shutting down FastAPI HTTP server.
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingunstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions