RE: mutex Giant not owned
On 16-Aug-01 John Baldwin wrote: On 16-Aug-01 David O'Brien wrote: # uname -a FreeBSD phuong.nuxi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #12: Sun Jul 15 19:07:45 PDT 2001 [EMAIL PROTECTED]:/files/Current/sys/alpha/compile/DS20 alpha Looks like a trapsignal() in trap() is being called w/o Giant. I'll look at it. Oh, I see why this is busted. If we take a trap in the kernel while holding Giant and it ends up doing a goto to 'out' we may unlock Giant while in the kernel. I'll try a different approach in a second: just grab Giant around trapsignal(). -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mutex Giant not owned
On Wed, 15 Aug 2001, David O'Brien wrote: panic: mutex Giant not owned at ../../../kern/vfs_subr.c:2363 ... #7 0xfc3d6090 in panic ( fmt=0xfc5a9096 mutex %s not owned at %s:%d) at ../../../kern/kern_shutdown.c:600 #8 0xfc3ca404 in _mtx_assert (m=0x0, what=0, file=0x0, line=0) at ../../../kern/kern_mutex.c:570 #9 0xfc5303c8 in vm_map_growstack (p=0xfe001fb7ad00, addr=301969984) at ../../../vm/vm_map.c:2473 #10 0xfc5612d8 in grow_stack (p=0x0, sp=0) at ../../../alpha/alpha/vm_machdep.c:412 #11 0xfc553bb0 in sendsig (catcher=0, sig=11, mask=0xfe001fb7aec8, code=5905801216) at ../../../alpha/alpha/machdep.c:1388 #12 0xfc3da534 in trapsignal (p=0xfe001fb7ad00, sig=11, code=5905801216) at ../../../kern/kern_sig.c:1060 #13 0xfc55eecc in trap (a0=5905801216, a1=1, a2=1, entry=2, framep=0xfe0023819ed8) at ../../../alpha/alpha/trap.c:617 #14 0xfc54ccdc in XentMM () alpha/trap.c seems to be missing the necessary aquiral of Giant before calling trapsignal(). Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
RE: mutex Giant not owned
On 16-Aug-01 David O'Brien wrote: # uname -a FreeBSD phuong.nuxi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #12: Sun Jul 15 19:07:45 PDT 2001 [EMAIL PROTECTED]:/files/Current/sys/alpha/compile/DS20 alpha Looks like a trapsignal() in trap() is being called w/o Giant. I'll look at it. Try this: Index: trap.c === RCS file: /usr/cvs/src/sys/alpha/alpha/trap.c,v retrieving revision 1.73 diff -u -r1.73 trap.c --- trap.c 2001/08/10 22:53:25 1.73 +++ trap.c 2001/08/16 04:29:40 @@ -611,14 +611,15 @@ framep-tf_regs[FRAME_TRAPARG_A0] = a0; framep-tf_regs[FRAME_TRAPARG_A1] = a1; framep-tf_regs[FRAME_TRAPARG_A2] = a2; + mtx_lock(Giant); trapsignal(p, i, ucode); out: if (user) { framep-tf_regs[FRAME_SP] = alpha_pal_rdusp(); userret(p, framep, sticks); - if (mtx_owned(Giant)) - mtx_unlock(Giant); } + if (mtx_owned(Giant)) + mtx_unlock(Giant); return; dopanic: -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message