From owner-freebsd-threads@FreeBSD.ORG Wed Jan 30 04:23:34 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 416A616A417 for ; Wed, 30 Jan 2008 04:23:34 +0000 (UTC) (envelope-from eischen@vigrid.com) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id EE7D713C457 for ; Wed, 30 Jan 2008 04:23:33 +0000 (UTC) (envelope-from eischen@vigrid.com) 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 m0U4NUTs005631; Tue, 29 Jan 2008 23:23:30 -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]); Tue, 29 Jan 2008 23:23:30 -0500 (EST) Date: Tue, 29 Jan 2008 23:23:30 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Landon Fuller In-Reply-To: <892A73B3-0114-4718-ABC0-CADD45D9D0FA@bikemonkey.org> Message-ID: References: <200801240850.m0O8o2JQ023500@freefall.freebsd.org> <4798564B.7070500@elischer.org> <488DBC6A-CF33-4E50-B1BB-C396C8957F92@bikemonkey.org> <892A73B3-0114-4718-ABC0-CADD45D9D0FA@bikemonkey.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Wed, 30 Jan 2008 04:23:34 -0000 On Tue, 29 Jan 2008, Landon Fuller wrote: > > 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? That just prevents an upcall from happening (which my patch solves), but doesn't prevent the corruption of the lockuser or lock. My patch does solve this in -current, but -stable probably lacks a few other patches. It (-stable) really needs all of -current's code, not just this patch. -- DE