Skip to content

[Bug]: CUDA error during nsys profile : unspecified launch failure #22746

@crischeng

Description

@crischeng

Your current environment

The output of python collect_env.py
Collecting environment information...
==============================
        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 4.0.3
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.7.1+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.11 (main, Jun  4 2025, 08:56:18) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-5.10.0-136.12.0.90.ctl3.x86_64-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 12.8.93
CUDA_MODULE_LOADING set to   : LAZY
GPU models and configuration :
GPU 0: NVIDIA H20-3e
GPU 1: NVIDIA H20-3e
GPU 2: NVIDIA H20-3e
GPU 3: NVIDIA H20-3e
GPU 4: NVIDIA H20-3e
GPU 5: NVIDIA H20-3e
GPU 6: NVIDIA H20-3e
GPU 7: NVIDIA H20-3e

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

==============================
          CPU Info
==============================
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   52 bits physical, 57 bits virtual
Byte Order:                      Little Endian
CPU(s):                          192
On-line CPU(s) list:             0-191
Vendor ID:                       GenuineIntel
BIOS Vendor ID:                  Intel(R) Corporation
Model name:                      INTEL(R) XEON(R) PLATINUM 8558P
BIOS Model name:                 INTEL(R) XEON(R) PLATINUM 8558P
CPU family:                      6
Model:                           207
Thread(s) per core:              2
Core(s) per socket:              48
Socket(s):                       2
Stepping:                        2
CPU max MHz:                     4000.0000
CPU min MHz:                     800.0000
BogoMIPS:                        5400.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 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 invpcid_single cdp_l2 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 xfd cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi 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 amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       4.5 MiB (96 instances)
L1i cache:                       3 MiB (96 instances)
L2 cache:                        192 MiB (96 instances)
L3 cache:                        520 MiB (2 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-47,96-143
NUMA node1 CPU(s):               48-95,144-191
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Retbleed:          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:        Vulnerable: eIBRS with unprivileged eBPF
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.2.6.post1+cu128torch2.7
[pip3] numpy==2.2.0
[pip3] nvidia-cublas-cu12==12.8.3.14
[pip3] nvidia-cuda-cupti-cu12==12.8.57
[pip3] nvidia-cuda-nvrtc-cu12==12.8.61
[pip3] nvidia-cuda-runtime-cu12==12.8.57
[pip3] nvidia-cudnn-cu12==9.7.1.26
[pip3] nvidia-cufft-cu12==11.3.3.41
[pip3] nvidia-cufile-cu12==1.13.0.11
[pip3] nvidia-curand-cu12==10.3.9.55
[pip3] nvidia-cusolver-cu12==11.7.2.55
[pip3] nvidia-cusparse-cu12==12.5.7.53
[pip3] nvidia-cusparselt-cu12==0.6.3
[pip3] nvidia-nccl-cu12==2.26.2
[pip3] nvidia-nvjitlink-cu12==12.8.61
[pip3] nvidia-nvtx-cu12==12.8.55
[pip3] pyzmq==27.0.0
[pip3] torch==2.7.1+cu128
[pip3] torchaudio==2.7.1
[pip3] torchvision==0.22.1
[pip3] transformers==4.53.2
[pip3] triton==3.3.1
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
Neuron SDK Version           : N/A
vLLM Version                 : 0.10.0
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
        ^[[4mGPU0       GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    NIC0    CPU Affinity    NUMA Affinity   GPU NUMA ID^[[0m
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    SYS     0-47,96-143     0               N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    SYS     0-47,96-143     0               N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    SYS     0-47,96-143     0               N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    SYS     0-47,96-143     0               N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    NODE    48-95,144-191   1               N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    NODE    48-95,144-191   1               N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    NODE    48-95,144-191   1               N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      NODE    48-95,144-191   1               N/A
NIC0    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE     X

Legend:

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

NIC Legend:

  NIC0: mlx5_bond_0

==============================
     Environment Variables
==============================
NVIDIA_VISIBLE_DEVICES=all
NVIDIA_REQUIRE_CUDA=cuda>=12.8 brand=unknown,driver>=470,driver<471 brand=grid,driver>=470,driver<471 brand=tesla,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=vapps,driver>=470,driver<471 brand=vpc,driver>=470,driver<471 brand=vcs,driver>=470,driver<471 brand=vws,driver>=470,driver<471 brand=cloudgaming,driver>=470,driver<471 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=560,driver<561 brand=grid,driver>=560,driver<561 brand=tesla,driver>=560,driver<561 brand=nvidia,driver>=560,driver<561 brand=quadro,driver>=560,driver<561 brand=quadrortx,driver>=560,driver<561 brand=nvidiartx,driver>=560,driver<561 brand=vapps,driver>=560,driver<561 brand=vpc,driver>=560,driver<561 brand=vcs,driver>=560,driver<561 brand=vws,driver>=560,driver<561 brand=cloudgaming,driver>=560,driver<561 brand=unknown,driver>=565,driver<566 brand=grid,driver>=565,driver<566 brand=tesla,driver>=565,driver<566 brand=nvidia,driver>=565,driver<566 brand=quadro,driver>=565,driver<566 brand=quadrortx,driver>=565,driver<566 brand=nvidiartx,driver>=565,driver<566 brand=vapps,driver>=565,driver<566 brand=vpc,driver>=565,driver<566 brand=vcs,driver>=565,driver<566 brand=vws,driver>=565,driver<566 brand=cloudgaming,driver>=565,driver<566
NCCL_VERSION=2.25.1-1
NVIDIA_DRIVER_CAPABILITIES=compute,utility
NVIDIA_PRODUCT_NAME=CUDA
VLLM_USAGE_SOURCE=production-docker-image
CUDA_VERSION=12.8.1
LD_LIBRARY_PATH=/usr/local/cuda/lib64
NCCL_CUMEM_ENABLE=0
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
CUDA_MODULE_LOADING=LAZY

🐛 Describe the bug

nsys --version
NVIDIA Nsight Systems version 2025.3.1.90-253135822126v0

command
'''
nsys profile -f true -o qwen32b.nsys-rep --trace-fork-before-exec=true --cuda-graph-trace=node python3 ~/code/vllm/benchmarks/benchmark_latency.py --model /data01/model/Qwen/Qwen3-32B-FP8 --num-iters-warmup 5 --num-iters 1 --batch-size 1 --input-len 1024 --output-len 1024 --tensor-parallel-size 2
'''

error message
'''
DEBUG 08-12 08:45:18 [utils.py:741] Waiting for 1 local, 0 remote core engine proc(s) to start.
^[[1;36m(VllmWorker rank=0 pid=13543)^[[0;0m INFO 08-12 08:45:18 [custom_all_reduce.py:196] Registering 8643 cuda graph addresses
^[[1;36m(VllmWorker rank=1 pid=13550)^[[0;0m INFO 08-12 08:45:18 [gpu_model_runner.py:2485] Graph capturing finished in 9 secs, took 1.30 GiB
^[[1;36m(VllmWorker rank=0 pid=13543)^[[0;0m INFO 08-12 08:45:18 [gpu_model_runner.py:2485] Graph capturing finished in 9 secs, took 1.30 GiB
INFO 08-12 08:45:18 [core.py:193] init engine (profile, create kv cache, warmup model) took 41.76 seconds
DEBUG 08-12 08:45:18 [utils.py:822] READY from local core engine process 0.
DEBUG 08-12 08:45:18 [core.py:660] EngineCore waiting for work.
DEBUG 08-12 08:45:18 [core.py:660] EngineCore waiting for work.
SamplingParams(n=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=1.0, top_p=1.0, top_k=0, min_p=0.0, seed=None, stop=[], stop_token_ids=[], bad_words=[], include_stop_str_in_output=False, ignore_eos=True, max_tokens=1024, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True, truncate_prompt_tokens=None, guided_decoding=None, extra_args=None)
Warming up...
^MWarmup iterations: 0%| | 0/5 [00:00<?, ?it/s]DEBUG 08-12 08:45:18 [core.py:666] EngineCore loop active.
[rank1]:[E812 08:45:27.348225005 ProcessGroupNCCL.cpp:1899] [PG ID 2 PG GUID 3 Rank 1] Process group watchdog thread terminated with exception: CUDA error: unspecified launch failure
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 /pytorch/c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: + 0x98389 (0x7fdcec376389 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) + 0x98 (0x7fdcec3785e8 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0xe0 (0x7fdcec30d4a2 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #3: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x3c2 (0x7fdd740a4422 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7fdb65f6d5a6 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0x70 (0x7fdb65f7d840 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::watchdogHandler() + 0x782 (0x7fdb65f7f3d2 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7fdb65f80fdd in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #8: + 0xdc253 (0x7fdd7574b253 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6)
frame #9: + 0x4bea9f (0x7fdd7dfe3a9f in /opt/nvidia/nsight-systems-cli/2025.3.1/target-linux-x64/libToolsInjection64.so)
frame #10: + 0x94ac3 (0x7fdd7d851ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #11: + 0x126850 (0x7fdd7d8e3850 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 1] Process group watchdog thread terminated with exception: CUDA error: unspecified launch failure
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 /pytorch/c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: + 0x98389 (0x7fdcec376389 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) + 0x98 (0x7fdcec3785e8 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0xe0 (0x7fdcec30d4a2 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #3: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x3c2 (0x7fdd740a4422 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10_cuda.so)
frame #4: c10d::ProcessGroupNCCL::WorkNCCL::finishedGPUExecutionInternal() const + 0x56 (0x7fdb65f6d5a6 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #5: c10d::ProcessGroupNCCL::WorkNCCL::isCompleted() + 0x70 (0x7fdb65f7d840 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #6: c10d::ProcessGroupNCCL::watchdogHandler() + 0x782 (0x7fdb65f7f3d2 in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #7: c10d::ProcessGroupNCCL::ncclCommWatchdog() + 0x14d (0x7fdb65f80fdd in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #8: + 0xdc253 (0x7fdd7574b253 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6)
frame #9: + 0x4bea9f (0x7fdd7dfe3a9f in /opt/nvidia/nsight-systems-cli/2025.3.1/target-linux-x64/libToolsInjection64.so)
frame #10: + 0x94ac3 (0x7fdd7d851ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #11: + 0x126850 (0x7fdd7d8e3850 in /usr/lib/x86_64-linux-gnu/libc.so.6)

Exception raised from ncclCommWatchdog at /pytorch/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1905 (most recent call first):
frame #0: + 0x98389 (0x7fdcec376389 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) + 0x98 (0x7fdcec3785e8 in /usr/local/lib/python3.12/dist-packages/torch/lib/libc10.so)
frame #2: + 0xcc7b9e (0x7fdb65f4fb9e in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #3: + 0x9165ed (0x7fdb65b9e5ed in /usr/local/lib/python3.12/dist-packages/torch/lib/libtorch_cuda.so)
frame #4: + 0xdc253 (0x7fdd7574b253 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6)
frame #5: + 0x4bea9f (0x7fdd7dfe3a9f in /opt/nvidia/nsight-systems-cli/2025.3.1/target-linux-x64/libToolsInjection64.so)
frame #6: + 0x94ac3 (0x7fdd7d851ac3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #7: + 0x126850 (0x7fdd7d8e3850 in /usr/lib/x86_64-linux-gnu/libc.so.6)

ERROR 08-12 08:45:33 [multiproc_executor.py:140] Worker proc VllmWorker-1 died unexpectedly, shutting down executor.
DEBUG 08-12 08:46:27 [shm_broadcast.py:456] No available shared memory broadcast block found in 60 second.
'''

it is work when I set VLLM_TRACE_FUNCTION
export VLLM_TRACE_FUNCTION=1

it is work without nsys profile,
COMMAND: python3 /data01/yuqi/code/vllm/benchmarks/benchmark_latency.py --model /data01/model/Qwen/Qwen3-32B-FP8 --num-iters-warmup 5 --num-iters 1 --batch-size 1 --input-len 1024 --output-len 1024 --tensor-parallel-size 2

it is work on one device,
COMMAND: nsys profile -f true -o qwen32b.nsys-rep --trace-fork-before-exec=true --cuda-graph-trace=node python3 /data01/yuqi/code/vllm/benchmarks/benchmark_latency.py --model /data01/model/Qwen/Qwen3-32B-FP8 --num-iters-warmup 5 --num-iters 1 --batch-size 1 --input-len 1024 --output-len 1024

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 working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions