|
From: Tony P. <tp...@as...> - 2016-03-10 18:50:30
|
I just ran helgrind on one of our internal apps and the mutex_is_valid assert is firing when pthread_cond_timedwait is called. I don't see any problem with our code as far as I can tell. The mutex is locked by the calling thread when pthread_cond_timedwait() is invoked. I was reading the docs and it mentioned something about dynamic condition/mutex bindings being a potential problem. Can anyone explain this? The gist of the code flagging the problem is that we have three threads calling pthread_cond_timedwait with a half-second delay. A fourth thread will broadcast the condition. All four threads share the same mutex and lock it while in use. I brought-up gdbserver and everything looks OK with the mutex when pthread_cond_timedwait is called. What other conditions can flag this error? Tony |