On Mon, 2012-12-17 at 21:03 +0900, ISHIKAWA,chiaki wrote:
> During running mozilla thunderbird mail client under helgrind,
> I got the following message:
> 
> ==13832== Thread #1: pthread_cond_destroy: destruction of condition
> variable being waited upon
> 
> 
> (See mozilla bugzilla entry
> https://bugzilla.mozilla.org/show_bug.cgi?id=819445
> ~nsHTTPListener() destroys condition variable on which other threads
> are blocked.)
> 
> 
> I wonder if we can learn WHICH THREADs, maybe the thread ids, were waiting
> on the said condition variable when this message is printed.
Assuming you have a recent version of Valgrind, you can activate
the embedded gdbserver and then use GDB to examine the state of all the
other threads when the above error is reported.
You will then see which threads are waiting on this cond var.

> 
> It would be at least great to learn which thread (maybe tid or its
> starting address or whatever) is waiting on the condition variable
> which is being destroyed, and also, it would be insanely great, if we
> can learn WHICH condition variable exactly is talked about (maybe its
> address?) is known.
> 
> I think it is definitely worthwhile if we can print the address of the
> condition variable being destroyed even if symbolic information is not
> available because in the same log I often see something about
> "destruction of unknown cond var" also. I wonder if we can correlate
> the addresses printed by these warning messages to see if one thread
> is prematurely destroying a cond variable which other threads really
> assume to continue to exist, etc.
Destruction of unknown cond var is probably/maybe bug
https://bugs.kde.org/show_bug.cgi?id=307082

> 
> By looking at helgrind/hg_main.c staring at line 2153 (I am quoting
> the function  map_cond_to_CVInfo_delete ( ThreadId tid, void* cond )
> below, I think printing the value of 'cond' as address
> in hexadecimal format would be enough to print the address of
> condition variable (I am not familiar how to print the symbolic
> information.) OR, since
I have in a corner a patch for helgrind which print symbolic information
for the lock addresses. Patch not finished yet.

Would be worth filing a wish bug in bugzilla telling that helgrind
could use --read-var-info=yes to show more info about
cond var addresses, lock addresses, etc.

Philippe





------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to