https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54185
Paul Groke <paul.groke at dynatrace dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.groke at dynatrace dot com --- Comment #16 from Paul Groke <paul.groke at dynatrace dot com> --- (In reply to Jonathan Wakely) > It fails reliably on AIX too. I think that is because of non-conformant behavior of AIX's pthread_mutex_destroy. It will return EBUSY as long as there are still threads executing a wait function, even if they're already blocked on re-acquiring the mutex. If you ignore the error and simply releases/unmap the memory of the CV, you have a good chance of getting a SIGSEGV in the wait function later (after it has re-acquired the mutex and presumably proceeds to mark the CV "non-busy"). In our tests, we get the EBUSY every time if we delete the CV while holding the mutex on the same thread. The SIGSEGV also reproduces quite well, although for some reason only with 32 bit builds. (AIX 7.1, oslevel 7100-05-03-1837)