Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2006 15:53:26 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   Re: panic: PHOLD of exiting process
Message-ID:  <200602241553.28548.jhb@freebsd.org>
In-Reply-To: <20060224195021.GA52892@peter.osted.lan>
References:  <20060224195021.GA52892@peter.osted.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602241553.28548.jhb>