Issue:
A GPU kernel that launches other pre-instantiated CUDA graphs from device code runs without issue standalone but crashes with Xid 13/31 when profiled under nsys. The only difference between pass and fail is the presence of nsys profile instrumentation.
hardware description & driver info: check attached nvidia-smi.txt file
nsys --version
NVIDIA Nsight Systems version 2025.1.3.140-251335620677v0
CUDA Version: 12.9
OS: Linux
nvidia-smi.txt (1.7 KB)
reproduction source files: refer attached files device_graph_xid_repro_cu.txt main_cu.txt
device_graph_xid_repro_cu.txt (17.7 KB)
main_cu.txt (384 Bytes)
Note: This is a minimal standalone reproducer extracted from a larger real-time signal processing application that exhibits the same crash. The original application uses this same device-graph launch pattern at production scale; the reproducer strips it down to the essential structure that triggers the failure.
build command: (rename repro files to *.cu before executing below command)
nvcc -o xid_repro device_graph_xid_repro.cu main.cu -O3 -dopt=on --generate-line-info --generate-code arch=compute_89,code=sm_89 --forward-unknown-to-host-compiler -g -std=c++17 --default-stream per-thread -L/usr/local/cuda-12.9/lib64 -lcudart_static -lculibos -lcudadevrt -lnvidia-ml -L/usr/lib/x86_64-linux-gnu -lcuda
dmesg logs during the crash attached.
running stand-alone:
$ ./xid_repro
XidRepro: Iter=199000 TickNs=37000 PollNs=100000 Streams=8 Variants=8 Kernels/g=6
XidRepro: DevRuntimePendingLaunchCount requested=16384 actual=16384 status=0
XidRepro: IterDone=199000 FFLaunched=199000 FFCompleted=199000 PeakInFlight=4 LaunchErr=0
XidRepro: LastLaunched stream=7 variant=7 cudaDeviceSync status=0
XidRepro: Result=PASS
running with nsys:
$ nsys profile ./xid_repro
WARNING: Device-side CUDA Event completion trace is currently enabled.
This may increase runtime overhead and the likelihood of false
dependencies across CUDA Streams. If you wish to avoid this, please
disable the feature with --cuda-event-trace=false.
Collecting data…
XidRepro: Iter=199000 TickNs=37000 PollNs=100000 Streams=8 Variants=8 Kernels/g=6
XidRepro: DevRuntimePendingLaunchCount requested=16384 actual=16384 status=0
CUDA error 700 from <device_graph_xid_repro.cu> line 487. Continuing…
XidRepro: IterDone=102767 FFLaunched=99864 FFCompleted=99864 PeakInFlight=4 LaunchErr=0
XidRepro: LastLaunched stream=0 variant=7 cudaDeviceSync status=700
XidRepro: Result=FAIL
Generating ‘/tmp/nsys-report-2528.qdstrm’
[1/1] [========================100%] report3.nsys-rep
Generated:
/root/report3.nsys-rep
repro_exe_run_logs.txt (1.3 KB)
dmesg.txt (22.6 KB)
Please let me know if you need any details.