Repository navigation
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Runtime Error
Component
cuda.bindings
Describe the bug
On Linux aarch64 with free-threaded Python 3.14, the cuda_bindings_13 test tests/test_nvvm.py::test_compile_program_with_minimal_nvvm_ir crashed with a segmentation fault inside libnvvm.so.4. It was the first failure in the job.
Job: 140095670292 (#3606, 0b7c8c3fa17f)
Test linux-aarch64 / pathfinder+bindings13+core13+meta13 / py3.14t, CTK13.5.0 (local CTK; bindings PR), GPU l4- Python 3.14.10 free-threaded, CUDA Toolkit 13.5.0, NVIDIA L4, driver 595.99.02
pytest-run-parallel0.10.0; the test ran under it
The Python frame is the nvvm.compile_program(...) call at line 134. The C stack is inside libNVVM, reached through the bindings:
tests/test_nvvm.py::test_compile_program_with_minimal_nvvm_ir[txt-options1] PARALLEL PASSED [ 92%]
Fatal Python error: Segmentation fault
Stack (most recent call first):
File ".../cuda_bindings_13/tests/test_nvvm.py", line 134 in test_compile_program_with_minimal_nvvm_ir
File ".../cuda_bindings_13/tests/conftest.py", line 180 in wrapper
File ".../site-packages/pytest_run_parallel/plugin.py", line 83 in closure
Current thread's C stack trace (most recent call first):
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x9d2b08
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x377804
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x37af9c
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x380994
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x382490
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x36a410
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x36abbc
Binary file ".../cuda_toolkit/nvvm/lib64/libnvvm.so.4", at +0x34cd14
Binary file ".../cuda/bindings/cynvvm.cpython-314t-aarch64-linux-gnu.so", at +0x11d88
Binary file ".../cuda/bindings/nvvm.cpython-314t-aarch64-linux-gnu.so", at +0x1d91c
The step ended with exit code 139. The job passed when re-run.
My reading, not verified: several threads were inside nvvm.compile_program at once, each on its own program. If libNVVM is not safe for that, the test needs a lock or a thread_unsafe marker.
Seen while watching CI on the pathfinder cleanup stack (#3616). Those PRs change only cuda_pathfinder/, and the pathfinder tests passed in the same job each time, so this looks unrelated to them.
How to Reproduce
CI only so far. Not reproduced locally. Intermittent: the job passed on re-run with the same commit.
Expected behavior
The test passes, or is marked so it does not run in parallel if libNVVM does not support that.
Operating System
Linux aarch64 (GitHub Actions self-hosted runner)
nvidia-smi output
NVIDIA L4, driver 595.99.02, CUDA 13.2 (from the job log).
Activity