Re: panic: mutex Giant not owned at ../../../kern/vfs_subr.c:1365

From: Kris Kennaway <kris_at_obsecurity.org>
Date: Tue, 13 Jul 2004 00:03:39 -0700
On Mon, Jul 12, 2004 at 10:01:04AM -0400, Robert Watson wrote:
> 
> On Sun, 11 Jul 2004, Kris Kennaway wrote:
> 
> > Running an up-to-date CVS kernel without debug.mpsafenet enabled
> 
> Could you confirm the following:
> 
> - You're running uipc_usrreq.c:1.133
> - You're running with INVARIANTS compile into the kernel
> 
> Each call to namei() in the current revision uipc_usrreq.c is preceeded by
> an assertion of Giant or an acquisition of Giant.  This suggests:
> 
> - You're not running uipc_usrreq.c:1.133 and therefore don't have all the
>   necessary changes.
> 
> - The assertion is violated, but you're not running with INVARIANTS (which
>   seems unlikely given that you later trip another assertion that
>   presumably also requires INVARIANTS :-). 
> 
> - Something else in the stack of functions there is dropping Giant and
>   failing to re-acquire it in time.

In case anyone else is following, door #3 seems to hold the prize.
Adding GIANT_REQUIRED shows that namei() is called with Giant held,
but something higher up is losing it.  The trigger seems to be syslogd
during boot, fwiw.

> > Debugger(c0766179,c07d1e80,2d9,c0765560,100) at Debugger+0x54
> > __panic(c0765560,2d9,c07656c8,c0765803,c076e07d) at __panic+0xf5
> > _mtx_assert(c07d09e0,1,c076e07d,555,c68544ec) at _mtx_assert+0x11c
> > gbincore(c6889514,0,0,985,c07d5980) at gbincore+0x36
> > getblk(c6889514,0,0,800,0) at getblk+0xf8
> > breadn(c6889514,0,0,800,0) at breadn+0x52
> > bread(c6889514,0,0,800,0) at bread+0x4c
> > ffs_blkatoff(c6889514,0,0,0,e0f87998) at ffs_blkatoff+0x105
> > ufs_lookup(e0f87a50,e0f87a8c,c05c77e1,e0f87a50,e0f87bc0) at ufs_lookup+0x270
> > ufs_vnoperate(e0f87a50,e0f87bc0,e0f87bd4,c076e07d,c61d62a0) at ufs_vnoperate+0x18
> > vfs_cache_lookup(e0f87ad0,e0f87aec,c05cca32,e0f87ad0,c61d62a0) at vfs_cache_lookup+0x301
> > ufs_vnoperate(e0f87ad0,c61d62a0,0,c61d62a0,c61d62a0) at ufs_vnoperate+0x18
> > lookup(e0f87bac,0,c076dac5,a2,c61d62a0) at lookup+0x312
> > namei(e0f87bac,c62088b2,d,c62088c0,0) at namei+0x27e
> > unp_bind(c6a09000,c62088b0,c61d62a0,e0f87ca0,c05b5e23) at unp_bind+0xb1
> > uipc_bind(c6427a50,c62088b0,c61d62a0,e0f87cc8,c05ba0e7) at uipc_bind+0x2b
> > sobind(c6427a50,c62088b0,c61d62a0,0,c6427a50) at sobind+0x23
> > kern_bind(c61d62a0,3,c62088b0,c62088b0,0) at kern_bind+0x87
> > bind(c61d62a0,e0f87d14,c,434,3) at bind+0x43
> > syscall(2f,2f,2f,bfbfee10,0) at syscall+0x2a0
> > Xint0x80_syscall() at Xint0x80_syscall+0x1f
> > --- syscall (104, FreeBSD ELF32, bind), eip = 0x280d21ff, esp = 0xbfbfe89c, ebp = 0xbfbfee98 ---

Kris
Received on Tue Jul 13 2004 - 05:03:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:01 UTC