From owner-freebsd-current@FreeBSD.ORG Fri Feb 24 20:52:35 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 684CC16A420 for ; Fri, 24 Feb 2006 20:52:35 +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 8470343D46 for ; Fri, 24 Feb 2006 20:52:34 +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 k1OKqPJZ064401; Fri, 24 Feb 2006 15:52:31 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Fri, 24 Feb 2006 15:53:26 -0500 User-Agent: KMail/1.9.1 References: <20060224195021.GA52892@peter.osted.lan> In-Reply-To: <20060224195021.GA52892@peter.osted.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602241553.28548.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1301/Fri Feb 24 05:04:11 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: 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: Fri, 24 Feb 2006 20:52:35 -0000 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