Comment #9 on issue 4759 by j...@chromium.org:  
ConditionVariableTest.LargeFastTaskTest hang with Application Verifier
http://code.google.com/p/chromium/issues/detail?id=4759

Maruel: Can you point me at the problematic line in the test?  I see  
that 'AutoLock
auto_lock(*queue.lock());' is used in the LargeFastTaskTest.  After getting  
such a
lock we call for a wait 'queue.all_threads_have_ids()->Wait();' using a  
condition
variable 'all_threads_have_ids' that was constructed using queue.lock (see  
the
constructor for WorkQueue).  As a result, the user_lock_ in the condition  
variable is
actually the same "queue.lock()".   Similarly, in any nested (less obvious)  
waits
called via the WorkQueue methods, one of the other condition variables,  
such as
work_is_available_ or no_more_tasks_ is used, which was also (see WorkQueue
constructor) initialized with the same WorkQueue.lock_ value.  That is  
basically how
condition variables are used.

It would be a mistake in I somehow used a private lock instead of the  
communal lock
commonly referred to as queue.lock().

My use of a private_lock in these tests is somewhat unnecessary, as I could  
have
called sleep(), but I was trying to get extra testing of the class.   
private_lock,
and related private_cv should not be used other than for sleeping.  As a  
result,
there is really only one lock (significantly) used in this whole test.   
Whether it is
called queue.lock(), or queue.lock_, or it is user_lock_ in constructed  
condition
variables, it is the same singular lock. (or at least it should be)

Could you give me the precise stack trace for the main (test) thread when  
there is a
deadlock?

Thanks,

Jim

Perhaps there is another place in teh code

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to