Files
OBLITERATUS/.github
Joseph MaglyandClaude Opus 5.5 4316dac5f3 test: serialise thread trace installation on Python < 3.12
Release-lane Tests py3.10/3.11 failed in two-rank thread worlds with
"Cannot install a trace function while another trace function is being
installed". CPython before 3.12 guards sys.settrace with a process-wide
reentrancy flag and runs audit hooks while it is set; filelock installs a
Python audit hook, so the GIL can switch inside that window and a second
thread starting under coverage's threading.settrace hook fails in
threading._bootstrap_inner. Python 3.12 coverage uses sys.monitoring and is
unaffected.

On Python < 3.12, make Thread.start return only once the new thread reaches
run(), i.e. after its trace function is installed. Locally on 3.11 with
coverage the distributed CPU tests went from 3 failures in 4 runs to 3/3
green.

Also let the always-run trend step tolerate missing Gloo shard files after
an earlier failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:19:21 -04:00
..