From: Andraz T. <And...@gu...> - 2003-05-29 23:23:47
|
I am trying to debug large heavily multithreaded program (Cinelerra) with Valgrind, but i think i have found a bug in valgrind instead. Basically, in one case locking mutex just after it was unlocked yields mutex block. Log is this: Unlocking mutex: 0x491c3c70 --17547-- PTHREAD[25]: pthread_mutex_unlock mx 0x491C3C70 ... Locking mutex: 0x491c3c70 --17547-- PTHREAD[25]: pthread_mutex_lock mx 0x491C3C70 ... --17547-- PTHREAD[25]: pthread_mutex_lock mx 0x491C3C70: BLOCK No lines between were deleted, so this events happen one after another. This is definitely wrong behaviour, as the lock after unlock should not block. I am using debian unstable, glibc 2.3.1, gcc 3.3 I tested this with valgrind 1.9.6 and with CVS version. Maybe worth mentioning is, that thread 25 wasn't the thread that created & locked the mutex at the first place, but this should not be an issue, since this is vaild behaviour in pthreads. Cinelerra uses mutex locking all over the place, but this behaviour is 100% reproducable - always happens with the same mutex. Bye Anrdaz |