https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103187
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- The relevant commit seems to be g:aeaea265cea3a2b2e772af7825351a4ceef29aac but that *should* only be an optimization to use futexes when available. The fact it times out without that change suggests the non-futex code has a bug, and it's probably still there on trunk.