Skip to content

[BUG]: cuda.core run_in_threads timeout tests fail intermittently on Windows #3634

Backlog

Description

@rparolin

Is this a duplicate?

Type of Bug

Runtime Error

Component

cuda.core

Describe the bug

Two tests added in #3544 fail now and then on Windows CI:

  • tests/test_helpers.py::test_run_in_threads_reports_a_thread_that_does_not_finish
  • tests/test_helpers.py::test_run_in_threads_reports_a_stuck_thread_before_another_threads_failure

Both start a worker that blocks in threading.Event.wait(30) and expect run_in_threads(..., timeout=0.1) (or 0.2) to raise TimeoutError("... still running"). In the failing runs no TimeoutError is raised.

Three failures on 2026-11-26, on three different runners:

Job Python GPU What happened
140048724195 (#3610, b596490c6520) 3.14.10 2x Tesla T4, TCC ..._a_thread_that_does_not_finish: Failed: DID NOT RAISE TimeoutError
140036079992 (#3621, 538e3edc7c4a) 3.14.10 free-threaded A100 40GB, MCDM ..._a_stuck_thread_before_another_threads_failure: ValueError: worker failed was raised instead of TimeoutError
140105744483 (#3610, 88b6f5cce3e9) 3.15.2 free-threaded RTX 2080, WDDM ..._a_thread_that_does_not_finish: Failed: DID NOT RAISE TimeoutError
    def test_run_in_threads_reports_a_thread_that_does_not_finish():
        release = threading.Event()
        try:
>           with pytest.raises(TimeoutError, match="still running"):
E           Failed: DID NOT RAISE TimeoutError

tests\test_helpers.py:719: Failed

run_in_threads raises TimeoutError only if a thread is still alive after join(timeout). So in these runs the waiting worker was no longer alive 0.1 to 0.2 seconds after it started. I do not know why. It is not limited to free-threaded Python: the first failure is on regular 3.14.

All three are Windows, driver 596.36, pytest-run-parallel 0.10.0. I have not seen it on Linux.

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. It is intermittent: in the CI round of the first two failures, the same jobs passed on other PRs of the stack that carry the same cuda_core code (for example #3609, #3611, #3619, #3620).

Expected behavior

Both tests pass every time.

Operating System

Windows (GitHub Actions self-hosted runners)

nvidia-smi output

Driver 596.36 on all three runners. GPUs as listed in the table.

Activity

  1. added
    bug
    triage
    test
    cuda.core
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcuda.coretesttriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions