Bug 205452

Summary: helgrind/tests/pth_spinlock fails intermittently on Fedora 9 and 11 and fails systematically on Ubuntu 9.04
Product: [Developer tools] valgrind Reporter: Bart Van Assche <bart.vanassche+kde>
Component: helgrindAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Bart Van Assche 2009-08-28 09:00:39 UTC
Version:           3.6.0.SVN (using KDE 4.3.0)
Compiler:          See nightly build output See nightly build output
OS:                Linux
Installed from:    Compiled From Sources

Helgrind reports that there is a bug in libpthread 
(recursive write lock). I'm not sure that this is a libpthread bug.

From the Fedora 11 x86_64 nightly build output:

=================================================
./valgrind-new/helgrind/tests/pth_spinlock.stderr.diff
=================================================
--- pth_spinlock.stderr.exp     2009-08-28 03:34:57.000000000 +0100
+++ pth_spinlock.stderr.out     2009-08-28 03:46:01.000000000 +0100
@@ -1,2 +1,35 @@
 Start of test.
+Thread #x was created
+   ...
+   by 0x........: pthread_create@* (hg_intercepts.c:...)
+   by 0x........: main (pth_spinlock.c:46)
+
+Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion
+   at 0x........: pthread_spin_lock (hg_intercepts.c:...)
+   by 0x........: thread_func (pth_spinlock.c:27)
+   by 0x........: mythread_wrapper (hg_intercepts.c:...)
+   ...
+
+Thread #x was created
+   ...
+   by 0x........: pthread_create@* (hg_intercepts.c:...)
+   by 0x........: main (pth_spinlock.c:46)
+
+Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion
+   at 0x........: pthread_spin_lock (hg_intercepts.c:...)
+   by 0x........: thread_func (pth_spinlock.c:27)
+   by 0x........: mythread_wrapper (hg_intercepts.c:...)
+   ...
+
+Thread #x was created
+   ...
+   by 0x........: pthread_create@* (hg_intercepts.c:...)
+   by 0x........: main (pth_spinlock.c:46)
+
+Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion
+   at 0x........: pthread_spin_lock (hg_intercepts.c:...)
+   by 0x........: thread_func (pth_spinlock.c:27)
+   by 0x........: mythread_wrapper (hg_intercepts.c:...)
+   ...
+
 Test successful.
Comment 1 Bart Van Assche 2011-03-13 10:30:20 UTC
Disabled this test in r11315.