From owner-cvs-all@FreeBSD.ORG Wed Nov 3 18:09:50 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B22F116A4CE for ; Wed, 3 Nov 2004 18:09:50 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8826043D31 for ; Wed, 3 Nov 2004 18:09:50 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 28333 invoked from network); 3 Nov 2004 18:09:50 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 3 Nov 2004 18:09:49 -0000 Received: from [10.50.41.235] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id iA3I9YLL078281; Wed, 3 Nov 2004 13:09:44 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: David Xu Date: Wed, 3 Nov 2004 14:04:56 -0500 User-Agent: KMail/1.6.2 References: <200411011049.iA1AnY8m012136@repoman.freebsd.org> <200411021549.27511.jhb@FreeBSD.org> <418817ED.2040201@freebsd.org> In-Reply-To: <418817ED.2040201@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411031404.56440.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Julian Elischer cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libpthread/thread thr_private.h thr_sig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 18:09:50 -0000 On Tuesday 02 November 2004 06:27 pm, David Xu wrote: > John Baldwin wrote: > >On Monday 01 November 2004 06:04 pm, David Xu wrote: > >>Not every important, I think I have another very important history > >>bug in hand, did you get my "fix famous libpthread conditional > >>variable race condition" mail ? :-) > > > >Oooo, can I test it please? We are still having problems with mono on > > HEAD here at work. I tried merging the changes in uthread_cond.c 1.32 to > > libpthread but that seemed to make it worse. The problems seem to be > > that a signal handler is being run when the SYNCQ sflag is set (but the > > thread is not on a cv or a mutex queue), and the handler calls sem_post() > > which is supposed to be signal safe. sem_post() tries to lock a mutex > > and then bombs with the assertion failure. > > You can try: > http://people.freebsd.org/~davidxu/kse/thr_cond.c.diff > > But it was not designed to fix the problem you have seen. :-) This looks like it's trying to fix the same problem as uthread_cond.c rev 1.32 in libc_r but in a different way. The fix for libc_r was to always unlock the mutex instead of trying to keep it locked in some cases. The kernel cv code works like this as well. I have a patch that ports 1.32 of uthread_cond.c to thr_cond.c if you are interested. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org