> thanks for your work on a helgrind replacement. Such a tool is a great help
> for us.
Thanks for the feedback and test program. What version of glibc do
your test machines have?
> 1. The concurrent writes on line 72 are not protected by a mutex
> (uncommented above and below). Thrcheck does not flag this error on my i386
> and x86_64 machines.
This appears to be scheduling-sensitive. For both i386 and x86_64 (Core 2
Duo) I get an error here maybe for every 1 run in 4:
Created counter at address: 0x62e9b20
[...]
Possible data race during write of size 4 at 0x62E9B20
at 0x401315: Loop::run() (bartothread.cpp:72)
by 0x400F7B: start (bartothread.cpp:44)
by 0x4C25DEB: mythread_wrapper (tc_intercepts.c:170)
by 0x4E2F09D: start_thread (in /lib64/libpthread-2.5.so)
by 0x58674CC: clone (in /lib64/libc-2.5.so)
Old state: shared-readonly by threads #3, #4
New state: shared-modified by threads #3, #4
Reason: this thread, #3, holds no consistent locks
Location 0x62E9B20 has never been protected by any lock
Unfortunate that the error-detection is scheduling-sensitive. Given the
use of pthread_cond_* that is difficult to avoid.
> 2. There is no race-condition for the writes in line 92. However the i386
> version of thrcheck flags an error here.
Yes .. also the x86_64 version flags an error. I'll look into it.
> 3. The x86_64 version only shows that one thread is started. Threads 3 -- 9
> are not shown.
I presume you mean you only get one message of the form
Thread #3 was created
at 0x586748E: clone (in /lib64/libc-2.5.so)
by 0x4E2F305: do_clone (in /lib64/libpthread-2.5.so)
by 0x4E2F7C5: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
by 0x4C23864: [EMAIL PROTECTED] (tc_intercepts.c:190)
These message are not printed when a thread starts - that would be
impractical for a program with many threads. They are printed on demand
so as to make later error messages make sense. Specifically, if it
produces a race message containing this:
Possible data race during [...]
Old state: shared-readonly by threads #3, #6
New state: shared-modified by threads #3, #6
then it will first print out a "Thread #3 was created at" message, and a
"Thread #6 was created at" message, so you can make sense of the race message.
> 4. The i386 version flags a possible race condition in line 41. In my
> opinion there is none.
I agree. You should ignore all race errors reported inside any
pthread_* function and inside ld.so. I tried to suppress them, but clearly
there is more work to do there.
J
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers