From owner-freebsd-threads@FreeBSD.ORG Tue Jan 29 23:15:05 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 04ABA16A417 for ; Tue, 29 Jan 2008 23:15:05 +0000 (UTC) (envelope-from landonf@bikemonkey.org) Received: from secure.bikemonkey.org (bluefish.bikemonkey.org [69.80.211.101]) by mx1.freebsd.org (Postfix) with ESMTP id CE47B13C447 for ; Tue, 29 Jan 2008 23:15:04 +0000 (UTC) (envelope-from landonf@bikemonkey.org) Received: from [192.168.54.11] (unknown [192.168.54.11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by secure.bikemonkey.org (Postfix) with ESMTP id 3B05217070; Tue, 29 Jan 2008 15:15:04 -0800 (PST) In-Reply-To: References: <200801240850.m0O8o2JQ023500@freefall.freebsd.org> <4798564B.7070500@elischer.org> <488DBC6A-CF33-4E50-B1BB-C396C8957F92@bikemonkey.org> Mime-Version: 1.0 (Apple Message framework v753) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-9-2999179" Message-Id: <892A73B3-0114-4718-ABC0-CADD45D9D0FA@bikemonkey.org> From: Landon Fuller Date: Tue, 29 Jan 2008 15:14:58 -0800 To: Daniel Eischen Content-Transfer-Encoding: 7bit X-Pgp-Agent: GPGMail 1.1.2 (Tiger) X-Mailer: Apple Mail (2.753) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: 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 List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2008 23:15:05 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-9-2999179 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Jan 29, 2008, at 13:13, Daniel Eischen wrote: >> > > There is a bug somewhere else or something is stomping > on the thread's lockuser. It is allocated once when the > thread is created and should never be null thereafter. > Hence, it should never be malloc'd and the reinit should > be sufficient. I'm totally unfamiliar with KSE, so perhaps this a stupid question -- it seems to solve the issue locally, so I'll ask it -- Why not place the fork() code inside of _kse_critical_enter / _kse_critical_leave, to ensure upcalls are blocked while re- initializing in the child process post-fork? Unless I'm off base, this should be an adequate replacement for this code? http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/kern_fork.c.diff? r1=1.285;r2=1.286 -landonf --Apple-Mail-9-2999179 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHn7NylplZCE/15mMRAjbZAKCKGhKp5wht4wXSo+14HWSkpIOIQACfaFh5 10JHx+QAWHep3PcHPPwgDZ8= =+pQ/ -----END PGP SIGNATURE----- --Apple-Mail-9-2999179--