Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: RuntimeError: Error in model execution: CUDA error: an illegal memory access was encountered #12233

Open
1 task done
Quang-elec44 opened this issue Jan 21, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Quang-elec44
Copy link

Quang-elec44 commented Jan 21, 2025

Your current environment

The output of `python collect_env.py`
Collecting environment information...
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.12.8 (main, Dec  4 2024, 08:54:12) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA A30
GPU 1: NVIDIA A30
GPU 2: NVIDIA A30
GPU 3: NVIDIA A30

Nvidia driver version: 550.120
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
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):                               144
On-line CPU(s) list:                  0-143
Vendor ID:                            GenuineIntel
BIOS Vendor ID:                       Intel
Model name:                           Intel(R) Xeon(R) Platinum 8452Y
BIOS Model name:                      Intel(R) Xeon(R) Platinum 8452Y
CPU family:                           6
Model:                                143
Thread(s) per core:                   2
Core(s) per socket:                   36
Socket(s):                            2
Stepping:                             8
CPU max MHz:                          3200.0000
CPU min MHz:                          800.0000
BogoMIPS:                             4000.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 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 cat_l2 cdp_l3 cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow 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 user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            3.4 MiB (72 instances)
L1i cache:                            2.3 MiB (72 instances)
L2 cache:                             144 MiB (72 instances)
L3 cache:                             135 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142
NUMA node1 CPU(s):                    1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143
Vulnerability Gather data sampling:   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:   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 BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] flashinfer==0.1.6+cu121torch2.4
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.0
[pip3] torch==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.47.1
[pip3] triton==3.1.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.6
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    GPU2    GPU3    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NODE    SYS     SYS     0,2,4,6,8,10    0               N/A
GPU1    NODE     X      SYS     SYS     0,2,4,6,8,10    0               N/A
GPU2    SYS     SYS      X      NODE    1,3,5,7,9,11    1               N/A
GPU3    SYS     SYS     NODE     X      1,3,5,7,9,11    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

NVIDIA_VISIBLE_DEVICES=all
NVIDIA_REQUIRE_CUDA=cuda>=12.1 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VLLM_USAGE_SOURCE=production-docker-image
CUDA_VERSION=12.1.0
CUDA_VISIBLE_DEVICES=0
CUDA_VISIBLE_DEVICES=0
LD_LIBRARY_PATH=/usr/local/lib/python3.12/dist-packages/cv2/../../lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
CUDA_MODULE_LOADING=LAZY

Model Input Dumps

No response

🐛 Describe the bug

I started 4 vllm Docker containers and set up NGINX as a load balancer, following this guide. Under high load, one of the containers crashed. This also occurred when I deployed a single container on 2 GPUs. I searched for solutions, but I couldn’t find any. Most users experience this issue when deploying the Qwen model (AWQ) (#10389 , #11366, #), but I don’t think that’s the problem in my case. Since my container stopped and was removed, I was unable to provide the .pkl file.

Here is the full log:

INFO 01-20 18:39:36 metrics.py:467] Avg prompt throughput: 2411.0 tokens/s, Avg generation throughput: 247.2 tokens/s, Running: 5 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 0.4%, CPU KV cache usage: 0.0%.
INFO 01-20 18:39:36 metrics.py:483] Prefix cache hit rate: GPU: 79.73%, CPU: 0.00%
INFO:     172.27.0.4:41468 - "POST /v1/chat/completions HTTP/1.0" 200 OK
INFO:     172.27.0.4:41454 - "POST /v1/chat/completions HTTP/1.0" 200 OK
INFO:     172.27.0.4:41502 - "POST /v1/chat/completions HTTP/1.0" 200 OK
INFO 01-20 18:39:37 model_runner_base.py:120] Writing input of failed execution to /tmp/err_execute_model_input_20250120-183937.pkl...
WARNING 01-20 18:39:37 model_runner_base.py:143] Failed to pickle inputs of failed execution: CUDA error: an illegal memory access was encountered
WARNING 01-20 18:39:37 model_runner_base.py:143] CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
WARNING 01-20 18:39:37 model_runner_base.py:143] For debugging consider passing CUDA_LAUNCH_BLOCKING=1
WARNING 01-20 18:39:37 model_runner_base.py:143] Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
WARNING 01-20 18:39:37 model_runner_base.py:143] 
ERROR 01-20 18:39:37 engine.py:135] RuntimeError('Error in model execution: CUDA error: an illegal memory access was encountered\nCUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1\nCompile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n')
ERROR 01-20 18:39:37 engine.py:135] Traceback (most recent call last):
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/model_runner_base.py", line 116, in _wrapper
ERROR 01-20 18:39:37 engine.py:135]     return func(*args, **kwargs)
ERROR 01-20 18:39:37 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/model_runner.py", line 1737, in execute_model
ERROR 01-20 18:39:37 engine.py:135]     logits = self.model.compute_logits(hidden_or_intermediate_states,
ERROR 01-20 18:39:37 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/qwen2.py", line 487, in compute_logits
ERROR 01-20 18:39:37 engine.py:135]     logits = self.logits_processor(self.lm_head, hidden_states,
ERROR 01-20 18:39:37 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
ERROR 01-20 18:39:37 engine.py:135]     return self._call_impl(*args, **kwargs)
ERROR 01-20 18:39:37 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl
ERROR 01-20 18:39:37 engine.py:135]     return forward_call(*args, **kwargs)
ERROR 01-20 18:39:37 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/logits_processor.py", line 77, in forward
ERROR 01-20 18:39:37 engine.py:135]     logits = _apply_logits_processors(logits, sampling_metadata)
ERROR 01-20 18:39:37 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/logits_processor.py", line 153, in _apply_logits_processors
ERROR 01-20 18:39:37 engine.py:135]     logits_row = logits_processor(past_tokens_ids,
ERROR 01-20 18:39:37 engine.py:135]                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/model_executor/guided_decoding/outlines_logits_processors.py", line 88, in __call__
ERROR 01-20 18:39:37 engine.py:135]     allowed_tokens = torch.tensor(allowed_tokens, device=scores.device)
ERROR 01-20 18:39:37 engine.py:135]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135] RuntimeError: CUDA error: an illegal memory access was encountered
ERROR 01-20 18:39:37 engine.py:135] CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
ERROR 01-20 18:39:37 engine.py:135] For debugging consider passing CUDA_LAUNCH_BLOCKING=1
ERROR 01-20 18:39:37 engine.py:135] Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
ERROR 01-20 18:39:37 engine.py:135] 
ERROR 01-20 18:39:37 engine.py:135] 
ERROR 01-20 18:39:37 engine.py:135] The above exception was the direct cause of the following exception:
ERROR 01-20 18:39:37 engine.py:135] 
ERROR 01-20 18:39:37 engine.py:135] Traceback (most recent call last):
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 133, in start
ERROR 01-20 18:39:37 engine.py:135]     self.run_engine_loop()
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 196, in run_engine_loop
ERROR 01-20 18:39:37 engine.py:135]     request_outputs = self.engine_step()
ERROR 01-20 18:39:37 engine.py:135]                       ^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 214, in engine_step
ERROR 01-20 18:39:37 engine.py:135]     raise e
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/multiprocessing/engine.py", line 205, in engine_step
ERROR 01-20 18:39:37 engine.py:135]     return self.engine.step()
ERROR 01-20 18:39:37 engine.py:135]            ^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/engine/llm_engine.py", line 1390, in step
ERROR 01-20 18:39:37 engine.py:135]     outputs = self.model_executor.execute_model(
ERROR 01-20 18:39:37 engine.py:135]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/executor/gpu_executor.py", line 88, in execute_model
ERROR 01-20 18:39:37 engine.py:135]     output = self.driver_worker.execute_model(execute_model_req)
ERROR 01-20 18:39:37 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/worker_base.py", line 343, in execute_model
ERROR 01-20 18:39:37 engine.py:135]     output = self.model_runner.execute_model(
ERROR 01-20 18:39:37 engine.py:135]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
ERROR 01-20 18:39:37 engine.py:135]     return func(*args, **kwargs)
ERROR 01-20 18:39:37 engine.py:135]            ^^^^^^^^^^^^^^^^^^^^^
ERROR 01-20 18:39:37 engine.py:135]   File "/usr/local/lib/python3.12/dist-packages/vllm/worker/model_runner_base.py", line 146, in _wrapper
ERROR 01-20 18:39:37 engine.py:135]     raise type(err)(f"Error in model execution: "
ERROR 01-20 18:39:37 engine.py:135] RuntimeError: Error in model execution: CUDA error: an illegal memory access was encountered
ERROR 01-20 18:39:37 engine.py:135] CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
ERROR 01-20 18:39:37 engine.py:135] For debugging consider passing CUDA_LAUNCH_BLOCKING=1
ERROR 01-20 18:39:37 engine.py:135] Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
ERROR 01-20 18:39:37 engine.py:135] 
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     172.27.0.4:41478 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41480 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41490 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41516 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41528 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41544 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41560 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41572 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     172.27.0.4:41608 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     172.27.0.4:41618 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
CRITICAL 01-20 18:39:37 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     172.27.0.4:41630 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     Shutting down
INFO:     Waiting for connections to close. (CTRL+C to force quit)
[rank0]:[W120 18:39:37.338511416 ProcessGroupNCCL.cpp:1250] Warning: WARNING: process group has NOT been destroyed before we destruct ProcessGroupNCCL. On normal program exit, the application should call destroy_process_group to ensure that any pending NCCL operations have finished in this process. In rare cases this process can exit before this point and block the progress of another member of the process group. This constraint has always been present,  but this warning has only been added since PyTorch 2.4 (function operator())
ERROR 01-20 18:39:45 client.py:282] RuntimeError('Engine process (pid 77) died.')
ERROR 01-20 18:39:45 client.py:282] NoneType: None
CRITICAL 01-20 18:39:46 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-20 18:39:46 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     172.27.0.4:41588 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:41604 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [1]

Here is how I started my containers:

# run.sh
hf_cache_dir=~/.cache/huggingface/

for device in $(seq 0 3); do
    port=$((8081 + device))
    container_name="vllm${device}"

    sudo docker run \
        -itd \
        --ipc host \
        --privileged \
        --network vllm_nginx \
        --gpus all \
        --shm-size=10.24gb \
        --rm \
        -e CUDA_VISIBLE_DEVICES=${device} \
        -v $hf_cache_dir:/root/.cache/huggingface/ \
        -p ${port}:8000 \
        --name ${container_name} \
        vllm/vllm-openai:latest \
            --host 0.0.0.0 \
            --port 8000 \
            --api-key "sk-no-key-required \
            --max-model-len 16384 \
            --tensor-parallel-size 1 \
            --gpu-memory-utilization 0.8 \
            --served-model-name "gpt-4o" \
            --seed 42 \
            --disable-log-requests \
            --enable-prefix-caching \
            --model "Qwen/Qwen2.5-7B-Instruct-AWQ"
done

Extra error log when deploying 32B model on 2 GPUs

INFO:     172.27.0.4:36730 - "POST /v1/chat/completions HTTP/1.0" 200 OK
INFO 01-22 00:11:25 metrics.py:467] Avg prompt throughput: 1461.3 tokens/s, Avg generation throughput: 24.6 tokens/s, Running: 8 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 21.7%, CPU KV cache usage: 0.0%.
INFO 01-22 00:11:25 metrics.py:483] Prefix cache hit rate: GPU: 24.79%, CPU: 0.00%
[rank0]:[E122 00:11:27.422564434 ProcessGroupNCCL.cpp:1595] [PG ID 2 PG GUID 3 Rank 0] Process group watchdog thread terminated with exception: CUDA error: an illegal memory access was encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Exception raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7a6875072446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7a687501c6e4 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x118 (0x7a687515ea18 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #3: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7a682a81e726 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0xa0 (0x7a682a8233f0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::watchdogHandler() + 0x1da (0x7a682a82ab5a in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7a682a82c61d in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: <unknown function> + 0x145c0 (0x7a68751d95c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #8: <unknown function> + 0x94ac3 (0x7a6875a2bac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #9: <unknown function> + 0x126850 (0x7a6875abd850 in /usr/lib/x86_64-linux-gnu/libc.so.6)

terminate called after throwing an instance of 'c10::DistBackendError'
  what():  [PG ID 2 PG GUID 3 Rank 0] Process group watchdog thread terminated with exception: CUDA error: an illegal memory access was encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Exception raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7a6875072446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7a687501c6e4 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x118 (0x7a687515ea18 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #3: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7a682a81e726 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0xa0 (0x7a682a8233f0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::watchdogHandler() + 0x1da (0x7a682a82ab5a in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7a682a82c61d in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: <unknown function> + 0x145c0 (0x7a68751d95c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #8: <unknown function> + 0x94ac3 (0x7a6875a2bac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #9: <unknown function> + 0x126850 (0x7a6875abd850 in /usr/lib/x86_64-linux-gnu/libc.so.6)

Exception raised from ncclCommWatchdog at ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1601 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x96 (0x7a6875072446 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0xe4271b (0x7a682a49971b in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #2: <unknown function> + 0x145c0 (0x7a68751d95c0 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch.so)
frame #3: <unknown function> + 0x94ac3 (0x7a6875a2bac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #4: <unknown function> + 0x126850 (0x7a6875abd850 in /usr/lib/x86_64-linux-gnu/libc.so.6)

ERROR 01-22 00:13:32 client.py:282] RuntimeError('Engine process (pid 77) died.')
ERROR 01-22 00:13:32 client.py:282] NoneType: None
CRITICAL 01-22 00:13:36 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     172.27.0.4:56768 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     Shutting down
INFO:     Waiting for connections to close. (CTRL+C to force quit)
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
CRITICAL 01-22 00:13:40 launcher.py:99] MQLLMEngine is already dead, terminating server process
INFO:     172.27.0.4:36784 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:54410 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:38956 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:38972 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:38988 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:38992 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:39006 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:39012 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:39014 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:39024 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:39026 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:39038 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     172.27.0.4:39046 - "POST /v1/chat/completions HTTP/1.0" 500 Internal Server Error
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [1]

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.
@Quang-elec44 Quang-elec44 added the bug Something isn't working label Jan 21, 2025
@sfc-gh-zhwang
Copy link
Contributor

@sfc-gh-zhwang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants