https://bugs.kde.org/show_bug.cgi?id=445743

--- Comment #1 from Paul Floyd <pjfl...@wanadoo.fr> ---
Interesting.

With Helgrind I get 

==13857== Thread #2: Bug in libpthread: write lock granted on mutex/rwlock
which is currently wr-held by a different thread
==13857==    at 0x403586F: mutex_lock_WRK (hg_intercepts.c:942)                 
==13857==    by 0x4012E2: contender_start (sched.c:16)                          
==13857==    by 0x40384A6: mythread_wrapper (hg_intercepts.c:406)               
==13857==    by 0x4A2BDD4: start_thread (in /usr/lib64/libpthread-2.17.so)      
==13857==    by 0x4D3DEAC: clone (in /usr/lib64/libc-2.17.so) 

This only happens when the mutex has the PTHREAD_PRIO_INHERIT attribute.

This doesn't seem to be a new problem - I can reproduce with Valgrind 3.13.

The Helgrind code also implies that there could be a race condition between the
intercept passing the call on to pthread_mutex_lock and Helgrind registering
the return from pthread_mutex_lock. That could be affected by changing the
priority.

The other possibility is that DRD uses its own CV and mutex to ensure that the
thread is joinable before it runs. There could be interference between the
guest mutex with elevated priority and this CV/mutex.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to