From owner-freebsd-current@FreeBSD.ORG Fri Nov 12 17:10:14 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6484816A4D0 for ; Fri, 12 Nov 2004 17:10:14 +0000 (GMT) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.FreeBSD.org (Postfix) with SMTP id B421D43D53 for ; Fri, 12 Nov 2004 17:10:13 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 93689 invoked from network); 12 Nov 2004 17:10:12 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 12 Nov 2004 17:10:12 -0000 X-pair-Authenticated: 209.68.2.70 Date: Fri, 12 Nov 2004 11:10:11 -0600 (CST) From: Mike Silbersack To: Robert Watson In-Reply-To: Message-ID: <20041112110924.W90223@odysseus.silby.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Sat, 13 Nov 2004 13:20:16 +0000 cc: jmg@FreeBSD.org cc: current@FreeBSD.org Subject: Re: Race in pipe tear-down, perhaps kqueue-related? (was: Re: Fatal trap , 12: page fault in kern/kern_mutex.c:744) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 17:10:14 -0000 On Fri, 12 Nov 2004, Robert Watson wrote: > This looks like a bug in the pipe code where-in a partially initialized > pipe is free'd due to memory allocation problems (hitting a resource > limit). pipeclose() is called when pipe_create() fails on one of the two > pipe endpoints, but it looks like pipeclose() is unprepared for the > eventuality that this is the case, as it attempts to generate wakeup > events on the pipe endpoint using pipeselwakeup(), which is not the right > thing to do while the pipe is not yet initialized. Maybe we need a > special pipeclose() tear-down path that doesn't assume the pipe has > already been fully initialized? > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Principal Research Scientist, McAfee Research I'll take a look into this over the weekend. Mike "Silby" Silbersack