Unpredictable scheduling behavior of threads
The POSIX standard states
The pthread_cond_broadcast() or pthread_cond_signal() functions may be called by a thread whether or not it currently owns the mutex that threads calling pthread_cond_wait() or pthread_cond_timedwait() have associated with the condition variable during their waits; _however, if predictable scheduling behavior is required, then that mutex shall be locked by the thread calling pthread_cond_broadcast() or pthread_cond_signal()_.
The highlighted recommendation isn't followed in by some thread pool functions which release the mutex before unblocking the threads. The issue was found using Helgrind (a Valgrind tool) which gave the warning Thread #1: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
It is worth mentioning that the thread tests do follow the recommendation.