Repository navigation
test: dump child tracebacks on GIL test deadlock, widen slow-exit budget - #6293
Conversation
The subprocess harness now records faulthandler dumps in the child and adds the last one to the DEADLOCK error, so rare CI hangs show where each thread stopped. test_run_in_process_slow_start_or_exit gave the callback only 0.1 s, which is too short for GraalPy. Use 0.5 s and a delay of twice that. Assisted-by: ClaudeCode:claude-opus-5-5
|
🤖 AI text below 🤖 I checked every failed job attempt in CI since Nov 1 for
|
|
Sharing the initial codex review below. I'll add a commit in a few minutes. codex GPT-6.2-Sol ultra: I’d approve #6293 after one small fix. Cancel the traceback watchdog in a
On Linux CPython 3.15.2, |
Keep watchdog setup and teardown outside the callback budget. Cancel the timer even when the child target raises, while the traceback file descriptor is still valid.
|
@henryiii In the meantime I changed my mind: I just merged this PR after seeing that the CI is green, so that we get the benefit of seeing the tracebacks while we work through the rest of the open PRs. If you discover issues with my added commit, we can handle them in a follow-up. |
🤖 AI text below 🤖
Description
Two changes to the
test_gil_scoped.pysubprocess harness:faulthandler.dump_traceback_later(repeat=True)into a temporary file. On a DEADLOCK, the parent adds the last dump to the error message. This is for rare hangs such astest_run_in_process_multiple_threads_sequential[first_use_gil_acquired]on Windows 3.14t, where CI gave no stack.test_run_in_process_slow_start_or_exit[shutdown]gave the callback 0.1 s, which failed on GraalPy macOS. It now uses 0.5 s, with a delay of twice the timeout, so a harness that counts the delay still fails.I checked locally that an intentional deadlock now shows the child's Python stack in the error.