Thank you for your response. (2012/12/23 2:58), Philippe Waroquiers wrote: > >> helgrind can't really know which task is being removed from the waiting list >> and >> so decrmenting nWaiters is all it does (I think). >> > I think it does a lot more (otherwise helgrind could not follow at all what > would > happen with cond variables). > See e.g. pthread_cond_wait_WRK
I will study it a more. >> Also, does anyone have a clever idea about how to debug this situation? > As mentionned previously, if you use vgdb, it should be trivial to find which > thread is doing what. > E.g. do in a GDB attached to the Valgrind embedded gdbserver: > thread apply all bt > > The stack traces will allow to determine which thread is waiting on a cond > var. > You can then examine which cond var is being waited upon. > Sorry, I was not making myself clear. I was wondering if finding out which tasks are waiting on a given cond variable that was going to be destroyed and for which pthread_cond_destroy() would return EBUSY (per POSIX) in an AUTOMATED TEST SETUP. If I am to debug a single program that generates problem based on my keyboard/mouse input, your suggestion of using vgdbserver/gdb works very well. (Yes, I have figured out how to run gdb from the start: --vgdb-error=0 did the trick.) When I say, AUTOMATED TEST SETUP, I am talking about mozilla thunderbird testing harness invoked by "make mozmill" there. It is a rather complicated setup. It runs a test sequence (mimicking user input by a description of user actions), and in so doing, it show that thuderbird invokes pthread_cond_destroy() for a few cond vars which helgrind thinks have still threads waiting on them. Since the testing is automated (and shrouded in many layers of test scripts), it is not easy to figure out how we can attach gdb to vgdbserver, and also, it is not quite clear how we can prepare the input for vgdbserver/gdb interaction. Maybe if I were to start from the scratch, I could do it. But mozmill test setup has been there already. Thus a non-interactive, helgrind-initiated output is preferable in this case. > Philippe Thank you again. Chiaki Ishikawa ------------------------------------------------------------------------------ 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