From owner-freebsd-threads@FreeBSD.ORG Wed Mar 2 15:48:10 2005 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5199616A4CF for ; Wed, 2 Mar 2005 15:48:10 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C153443D5C for ; Wed, 2 Mar 2005 15:48:09 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j22Fm8Ec028193; Wed, 2 Mar 2005 10:48:08 -0500 (EST) Date: Wed, 2 Mar 2005 10:48:08 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Andriy Tkachuk In-Reply-To: <000e01c51f37$fb3dc980$090210ac@BORJA> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: threads@freebsd.org Subject: Re: patch for threads/76690 - critical - fork hang in child for -lc_r X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 02 Mar 2005 15:48:10 -0000 On Wed, 2 Mar 2005, Andriy Tkachuk wrote: > Hi folks. > > I spent some time on the problem in $subj and found some > solution that seems to be working but i'm not sure about it's > architectural correctness because libc was changed little bit ;) This is already fixed in libpthread in both -current and -stable. Your patch also pollutes the application namespace with a global symbol thread_lock -- there is already a symbol in malloc.c that is there just for this purpose (__malloc_lock). See how libpthread uses __malloc_lock and reinitializes the spinlocks in thr_kern.c (_kse_single_thread()). Is there a reason you are still using libc_r? -- DE