From owner-freebsd-current@FreeBSD.ORG Tue Feb 28 17:44:38 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 9E7B116A420 for ; Tue, 28 Feb 2006 17:44:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13A7443D46 for ; Tue, 28 Feb 2006 17:44:37 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k1SHiWPs018550; Tue, 28 Feb 2006 12:44:36 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Peter Holm Date: Tue, 28 Feb 2006 12:08:03 -0500 User-Agent: KMail/1.9.1 References: <20060224195021.GA52892@peter.osted.lan> <200602241553.28548.jhb@freebsd.org> <20060226093556.GA615@peter.osted.lan> In-Reply-To: <20060226093556.GA615@peter.osted.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602281208.04616.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1306/Tue Feb 28 04:50:04 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED,AWL autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: freebsd-current@freebsd.org Subject: Re: panic: PHOLD of exiting process X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 28 Feb 2006 17:44:38 -0000 On Sunday 26 February 2006 04:35, Peter Holm wrote: > On Fri, Feb 24, 2006 at 03:53:26PM -0500, John Baldwin wrote: > > On Friday 24 February 2006 14:50, Peter Holm wrote: > > > GENERIC HEAD from Feb 23 18:08 UTC > > > > > > panic: PHOLD of exiting process > > > cpuid = 0 > > > KDB: enter: panic > > > [thread pid 75139 tid 100298 ] > > > Stopped at kdb_enter+0x2b: nop > > > db> where > > > Tracing pid 75139 tid 100298 td 0xc24244e0 > > > kdb_enter(c0888514) at kdb_enter+0x2b > > > panic(c084a3c9,d57,c09af2d8,e,c08904ae) at panic+0x14b > > > softdep_disk_io_initiation(c72ea010) at > > > softdep_disk_io_initiation+0x7a > > > ffs_geom_strategy(c242beec,c72ea010) at ffs_geom_strategy+0x32 > > > bufwrite(c72ea010,0,0,cd5419b4,c0784aa1) at bufwrite+0x15a > > > ffs_bufwrite(c72ea010) at ffs_bufwrite+0x282 > > > ffs_update(c3121b2c,0,c3121b2c,c23d8c00,1) at ffs_update+0x3a5 > > > ufs_inactive(cd541a04) at ufs_inactive+0x178 > > > VOP_INACTIVE_APV(c092b5e0,cd541a04) at VOP_INACTIVE_APV+0x7e > > > vinactive(c3121b2c,c24244e0) at vinactive+0x72 > > > vput(c3121b2c,c23d8c00,c093a720,c3121b2c,1) at vput+0x188 > > > vn_close(c3121b2c,1,c2d74600,c24244e0,cd541acc) at vn_close+0x96 > > > vn_closefile(c26b1e10,c24244e0) at vn_closefile+0xca > > > fdrop_locked(c26b1e10,c24244e0,c219a3a0,0,c0884d50) at > > > fdrop_locked+0x88 > > > fdrop(c26b1e10,c24244e0,6b5,c095b034,0) at fdrop+0x24 > > > closef(c26b1e10,c24244e0) at closef+0x367 > > > fdfree(c24244e0) at fdfree+0x4a3 > > > exit1(c24244e0,0,cd541d30,c081b34e,c24244e0) at exit1+0x450 > > > exit1(c24244e0,cd541d04,c3a77890,c,c24244e0) at exit1 > > > syscall(3b,3b,3b,2804eaec,bfbfebe8) at syscall+0x27a > > > > > > http://people.freebsd.org/~pho/stress/log/cons188.html > > > > I'm talking with Jeff and Kris about it. This is my current thinking: > > > > --- //depot/vendor/freebsd/src/sys/sys/proc.h 2006/02/22 19:00:49 > > +++ //depot/projects/smpng/sys/sys/proc.h 2006/02/24 20:11:28 > > @@ -792,7 +792,8 @@ > > } while (0) > > #define _PHOLD(p) do { \ > > PROC_LOCK_ASSERT((p), MA_OWNED); \ > > - KASSERT(!((p)->p_flag & P_WEXIT), ("PHOLD of exiting process"));\ > > + KASSERT(!((p)->p_flag & P_WEXIT) || (p) == curproc, \ > > + ("PHOLD of exiting process")); \ > > (p)->p_lock++; \ > > if (((p)->p_sflag & PS_INMEM) == 0) \ > > faultin((p)); \ > > > > -- > > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > > "Power Users Use the Power to Serve" = http://www.FreeBSD.org > > Without your patch I get two of these panics within a short time frame > of testing. With your patch I have not seen this problem for a 24 hour > period of testing. I'll commit it along with a note of why the assertion is still safe. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org