Hi Justin,
do you (or anyone here) by any chance know if there any way to get Apple devs to pay attention to
the report I submitted few days ago:
(marked as FB25195692)
It's essentially a reproduction of something Pari/GP devs found last year,
and it goes back a few versions of macOS, reproducible on Intel and arm64.
It might be one of the reasons our testing on macOS is flakier than on Linux...
Probably a race in the kernel (statistically, about 0.1%-0.5% of threads in the testing can't get canceled, and persist no matter what; same code runs fine on Linux, where everything is fine).
Python script and C code attached.
Running it on macOS looks like this (which run times out is a lottery, but well, 10000 runs is
always enough):
% ./reproduce.py # it does the compilation, too
1000 runs completed
Run 1338 timed out; sampling PID 12201
{
"started": "2026-10-17T21:56:34.320583-05:00",
"build_command": [
"cc",
"-O2",
"-g",
"-Wall",
"-Wextra",
"-pthread",
"/private/tmp/bill-pthread-checked.c",
"-o",
"/private/tmp/results/bill-pthread-checked"
],
"requested_iterations": 10000,
"timeout_seconds": 5,
"confirmation_seconds": 10,
"completed": 1337,
"outcome": "persistent-hang",
"iteration": 1338,
"pid": 12201,
"observed_at": "2026-10-17T21:56:42.629657-05:00",
"initial_sample_status": 0,
"confirmation_sample_status": 0,
"returncode": -9,
"stdout": "",
"stderr": "",
"elapsed_seconds": 20.53075637499569
}
whereas on Linux no runs are timed out.
Best
Dima