https://bugzilla.novell.com/show_bug.cgi?id=865968
https://bugzilla.novell.com/show_bug.cgi?id=865968#c4
--- Comment #4 from Michael Matz matz@suse.com 2014-03-03 14:32:08 UTC --- FWIW, this trivial testcase that checks exactly what is described in the initial comment does _not_ fail:
--------------------------------------------------------------- #include <stdio.h> #include <errno.h> #include <error.h> #include <pthread.h>
int main() { pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; if (pthread_mutex_lock (&mutex)) error (1, errno, "mutex lock failed"); if (pthread_mutex_trylock (&mutex) != 0) printf ("Okay\n"); else error (1, errno, "trylock didn't fail with EBUSY"); return 0; } ---------------------------------------------------------------
Tried on haswell and non-haswell, on haswell with HLE routines, e.g. with glibc-2.18.90-4.24.x86_64 . So yes, this needs a different self-contained testcase.