Issue: Python Script Hangs with Nsight Systems Profiling When NVTX is Enabled
Description:
A minimal Python script (run.py) that uses subprocess.check_output hangs indefinitely when profiled with nsys and NVTX tracing is enabled.
Python Script (run.py):
import os
import subprocess
import sys
print(subprocess.check_output(['file', '-b', os.path.realpath(sys.executable)]))
Profiling Command (Hangs):
nsys profile -s none -t nvtx,cuda -f true -o demo python run.py
Observation and Non-Hanging Command
The hanging behavior is directly tied to the inclusion of NVTX tracing. When NVTX tracing is removed from the profiling command, the script executes, and the profiling completes successfully.
Non-Hanging Profiling Command (NVTX Trace Removed):
nsys profile -s none -t cuda -f true -o demo python run.py
Environment Details
| Component | Version/Detail |
|---|---|
| Operating System | Linux-6.17.0-2-default-x86_64 |
| Python Version | 3.12.11 (Anaconda) |
| Nsight Systems CLI | 2025.5.1.121-255136380782v0 |
| NVIDIA Driver | 580.95.05 (Reports CUDA Version 13.0) |
| GPU | NVIDIA GeForce RTX 3070 Laptop GPU (8GiB) |