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.core
Describe the bug
On Linux with free-threaded Python 3.14, one kernel launch failed with CUDA_ERROR_LAUNCH_FAILED. After that about 350 later tests failed with the same error, and the run ended in a segmentation fault.
Job: 140106126239 (#3613, 619b4d50e06a)
Test linux-64 / pathfinder+bindings12+core12+meta12 / py3.14t, CTK12.9.1 (local CTK; bindings PR), GPU t4- Python 3.14.10 free-threaded, CUDA Toolkit 12.9.1, Tesla T4, driver 595.99.02
pytest-run-parallel0.10.0
First failure, at 42% of the cuda_core tests. Everything before it passed:
tests/test_launcher.py::test_cooperative_launch PARALLEL PASSED [ 42%]
cupy_backends.cuda.api.driver.CUDADriverError: CUDA_ERROR_LAUNCH_FAILED: unspecified launch failure
tests/test_launcher.py::test_launch_with_buffers_allocated_by_memory_resource[device_memory_resource] PARALLEL FAILED [ 42%]
tests/test_launcher.py::test_launch_with_buffers_allocated_by_memory_resource[device_memory_resource] ERROR [ 42%]
Then the cascade: 349 tests report FAILED, and CUDA_ERROR_LAUNCH_FAILED appears 389 times in the log.
The end, at 92%:
tests/test_texture_surface.py::test_texture_border_color_is_sampled_on_device PARALLEL FAILED [ 92%]
Fatal Python error: Segmentation fault
Stack (most recent call first):
File ".../cuda_core/tests/test_texture_surface.py", line 1395 in test_surface_creation_rejects_foreign_context_resource
File ".../cuda_core/tests/conftest.py", line 125 in wrapper
File ".../site-packages/pytest_run_parallel/plugin.py", line 83 in closure
Line 1395 is init_cuda.create_context(ContextOptions(resources=[groups[0]])). The step ended with exit code 139.
There are two things here:
- Why the first launch failed. I do not know. The test is
test_launch_with_buffers_allocated_by_memory_resource[device_memory_resource], and the error is reported through CuPy. - One failed launch takes down the rest of the run. The log gives no sign that the test session notices the context is unusable, so the real failure is buried under 350 others and a crash.
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. Seen once so far.
Expected behavior
The launch succeeds. If a launch does fail, the run should stop or recover instead of failing every later test and crashing.
Operating System
Linux x86_64 (GitHub Actions self-hosted runner)
nvidia-smi output
Tesla T4, driver 595.99.02, CUDA 13.2 (from the job log).
Activity