See http://pubs.opengroup.org/onlinepubs/007908775/xsh/pthread_mutex_lock.html The pthread_mutex_unlock() function may fail if: [EPERM] The current thread does not own the mutex. The test code locks mutexes from one thread and unlocks them from another, which is not allowed. FreeBSD follows the standard more closely, and so this test fails.
Resolved by r205900