From owner-freebsd-threads@FreeBSD.ORG Thu Jan 24 22:38:51 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B96716A41B; Thu, 24 Jan 2008 22:38:51 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0135113C4D3; Thu, 24 Jan 2008 22:38:50 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m0OMcmrL026514; Thu, 24 Jan 2008 17:38:48 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Thu, 24 Jan 2008 17:38:48 -0500 (EST) Date: Thu, 24 Jan 2008 17:38:48 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Alfred Perlstein In-Reply-To: <20080124223133.GU99258@elvis.mu.org> Message-ID: References: <200801240850.m0O8o2JQ023500@freefall.freebsd.org> <4798564B.7070500@elischer.org> <20080124222339.GT99258@elvis.mu.org> <20080124223133.GU99258@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Gary Stanley , Julian Elischer , freebsd-threads@freebsd.org Subject: Re: threads/119920: fork broken in libpthread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2008 22:38:51 -0000 On Thu, 24 Jan 2008, Alfred Perlstein wrote: > * Daniel Eischen [080124 14:28] wrote: >> On Thu, 24 Jan 2008, Alfred Perlstein wrote: >> >>> * Julian Elischer [080124 01:17] wrote: >>>> Gary Stanley wrote: >>>>> The following reply was made to PR threads/119920; it has been noted by >>>>> GNATS. >>>>> >>>>> From: Gary Stanley >>>>> To: bug-followup@FreeBSD.org >>>>> Cc: >>>>> Subject: Re: threads/119920: fork broken in libpthread >>>>> Date: Thu, 24 Jan 2008 03:24:47 -0500 >>>>> >>>>> I also have this problem, see threads/118715 >>>>> >>>>> I was able to grab some ktrace info, but most of the time the process >>>>> is stuck, and ktrace doesn't display any data. >>>>> >>>>> _______________________________________________ >>>>> freebsd-threads@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-threads >>>>> To unsubscribe, send any mail to >>>>> "freebsd-threads-unsubscribe@freebsd.org" >>>> >>>> dan what IS the fix for this? I assume you must have fixed it in >>>> -current/7 >>>> >>>> what was YOUR fix alfred? >>> >>> Attached. >> >> Which isn't a correct fix, BTW. It is possible that the unlock >> can try to give the lock to a non-existent thread. > > Yes, I understand that problem, but it's not clear to my why/how it can happen. > > I guess because another thread could put itself on the "blocked queue" > for that lock? Is there a way to prevent that or to clear the lock > afterward? Well, you don't have to worry about this if you use my fix. The thread locks are reinitialized and the KCB and TCB are reset after the fork. -- DE