threads/128180: pthread_cond_broadcast(3) lost wakeup
Alfred Perlstein
alfred at freebsd.org
Tue Nov 4 07:41:14 PST 2008
* Ed Maste <emaste at freebsd.org> [081104 06:40] wrote:
> The following reply was made to PR threads/128180; it has been noted by GNATS.
>
> From: Ed Maste <emaste at freebsd.org>
> To: bug-followup at FreeBSD.org, kurt at intricatesoftware.com
> Cc:
> Subject: Re: threads/128180: pthread_cond_broadcast(3) lost wakeup
> Date: Tue, 4 Nov 2008 09:09:38 -0500
>
> > The test program doesn't look correct to me. It seems possible
> > for only a few of the threads (as little as 2) to do all the
> > work. Thread 1 can start doing work, then wait for a broadcast.
> > Thread 2 can start doing his work, then broadcast waking thread 1.
>
> It looks to me like the "tickets" and "finished" globals should make
> the test program operate correctly. If the scenario you describe
> happens, thread 1 will just enter pthread_cond_wait again and wait
> for the broadcast from the primordial thread.
This bug may have been fixed in 6-stable and 6.4.
http://svn.freebsd.org/viewvc/base?view=revision&revision=184172
Can you try upgrading?
--
- Alfred Perlstein
More information about the freebsd-threads
mailing list