Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 1998 17:26:29 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        eischen@vigrid.com, info@highwind.com
Cc:        bright@hotjobs.com, current@FreeBSD.ORG
Subject:   Re: Another Serious libc_r problem
Message-ID:  <199810192126.RAA24567@pcnet1.pcnet.com>

next in thread | raw e-mail | index | archive | help
>    I believe your test program is in error.  Your threads are
>    not ever going to awake from the pthread_cond_wait() statement
>    because the mutex cannot be acquired.  Your main thread locks
>    the mutex and never unlocks it.
> 
> I claim that doesn't matter. WHY should the CPU spin if I signal
> twice on a lock I have? That is PERFECTLY valid.
> 
> Let's say I want to say that TWO events are ready to be handled.
> That is perfectly fine.
> 
> Simply to placate your claim, here is another version that locks and
> unlocks the mutex in proper fashion. I simply had to insert an
> additional "sleep" to get the bug to appear.

This works peachy on -stable.  I don't have access to a -current box until
I get home.

> 
> In both cases, spinning the CPU at 100% and allowing the program to 
> hang and make no forward progress is a SERIOUS bug.

Like I said earlier, I believe there was a recent fix for this.
If you search the -current mailing list archive, you'll see the
original post about this problem and an included patch that
purportedly fixes it.  Search for "1,000,001 yields and still second
thread doesn't execute"

Dan Eischen
eischen@vigrid.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810192126.RAA24567>