From owner-freebsd-current Mon Oct 19 14:27:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA21349 for freebsd-current-outgoing; Mon, 19 Oct 1998 14:27:02 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA21344 for ; Mon, 19 Oct 1998 14:26:59 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id RAA24567; Mon, 19 Oct 1998 17:26:29 -0400 (EDT) Date: Mon, 19 Oct 1998 17:26:29 -0400 (EDT) From: Daniel Eischen Message-Id: <199810192126.RAA24567@pcnet1.pcnet.com> To: eischen@vigrid.com, info@highwind.com Subject: Re: Another Serious libc_r problem Cc: bright@hotjobs.com, current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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