From: John Maddock (john_at_[hidden])
Date: 2005-09-01 12:24:59
> Hopefully this is a little more readable. My set up is gcc 3.3.5 on
> Suse 9.3 pro x86_64 with dual opterons.
> Hope this helps,
I can reproduce that on WinXP with VC7.1.
I can also reduce the number of threads to about 10 and still get the
However, I can't see what the problem is: when the deadlock occurs all the
threads are waiting for the writer condition variable (m_waiting_writers) to
wake up one of the writers at
Line 512. The member m_waking_writers is set to one, and as far as I can
see that can only occur in
read_write_mutex_impl<Mutex>::do_wake_writer(void) line 1425, which then
must have notified the condition variable to wake up one thread. m_state
must have been set to zero before all this happens so the woken thread
should not loop and go back to sleep (Footnote, actually that appears not
to be true, sometimes a thread is woken with m_state == -1 but that appears
not to be the immediate cause of the problem). So.. I'm stumped at present.
Hopefully someone else can also take a look at this?