Giant not owned in gbincore()
Dag-ErlingSmørgrav
des at des.no
Sat Mar 20 14:57:55 PST 2004
running America's Army 2.0.0a under ktrace results in the following
panic:
% cat panic
panic: mutex Giant not owned at /usr/src/sys/kern/vfs_subr.c:1369
at line 719 in file /usr/src/sys/kern/kern_mutex.c
cpuid = 0;
Debugger("panic")
Stopped at Debugger+0x48: xchgl %ebx,in_Debugger.0
db> trace
Debugger(c05bbb8d,100,c671c150,c0606060,559) at Debugger+0x48
__panic(c05baf84,2cf,c05bb120,c05bb207,c05c1fe2) at __panic+0x157
_mtx_assert(c0606060,1,c05c1fe2,559,c05c08b2) at _mtx_assert+0x89
gbincore(c609e514,a79d6c0,0,c609e514,0,c05c08b2,98b) at gbincore+0x25
getblk(c609e514,a79d6c0,0,4000,0) at getblk+0x9c
breadn(c609e514,a79d6c0,0,4000,0) at breadn+0x34
bread(c609e514,a79d6c0,0,4000,0,ebbd1c2c) at bread+0x20
ffs_update(c9bd2104,0,c9bd2104,c5fa0800,1) at ffs_update+0x13c
ufs_inactive(ebbd1c94,ebbd1cac,c04ebd04,ebbd1c94,c05fc6a0) at ufs_inactive+0x10b
ufs_vnoperate(ebbd1c94,c05fc6a0,c9bd2104,c671c150,c05b947b) at ufs_vnoperate+0x13
vrele(c9bd2104,c6a2606c,c6a26000,c671c150,c6a26000) at vrele+0x104
exit1(c671c150,100,ebbd1d40,c058eff9,c671c150) at exit1+0x47a
exit1(c671c150,ebbd1d14,1,3,246) at exit1
syscall(2f,2f,2f,1,288f3980) at syscall+0x129
Xint0x80_syscall() at Xint0x80_syscall+0x1d
--- syscall (1, Linux ELF, sys_exit), eip = 0x288787dd, esp = 0xbfbfe56c, ebp = 0xbfbfe598 ---
% perl -n -e '/ at (\w+\+0x\w+)/ && print "print $1\nlist *($1)\n"' panic | gdb -k -batch -x /dev/stdin /usr/obj/usr/src/sys/dwp_smp/kernel.debug
Debugger+0x48
0xc057d21c is in Debugger (machine/atomic.h:263).
258 machine/atomic.h: No such file or directory.
in machine/atomic.h
__panic+0x157
0xc04a4d6b is in __panic (/usr/src/sys/kern/kern_shutdown.c:536).
531
532 #if defined(DDB)
533 if (newpanic && trace_on_panic)
534 backtrace();
535 if (debugger_on_panic)
536 Debugger ("panic");
537 #ifdef RESTARTABLE_PANICS
538 /* See if the user aborted the panic, in which case we continue. */
539 if (panicstr == NULL) {
540 #ifdef SMP
_mtx_assert+0x89
0xc049d509 is in _mtx_assert (/usr/src/sys/kern/kern_mutex.c:722).
717 if (!mtx_owned(m))
718 panic("mutex %s not owned at %s:%d",
719 m->mtx_object.lo_name, file, line);
720 if (mtx_recursed(m)) {
721 if ((what & MA_NOTRECURSED) != 0)
722 panic("mutex %s recursed at %s:%d",
723 m->mtx_object.lo_name, file, line);
724 } else if ((what & MA_RECURSED) != 0) {
725 panic("mutex %s unrecursed at %s:%d",
726 m->mtx_object.lo_name, file, line);
gbincore+0x25
0xc04ead71 is in gbincore (/usr/src/sys/kern/vfs_subr.c:1372).
1367 struct buf *bp;
1368
1369 GIANT_REQUIRED;
1370
1371 ASSERT_VI_LOCKED(vp, "gbincore");
1372 if ((bp = vp->v_cleanblkroot) != NULL &&
1373 bp->b_lblkno == lblkno && !(bp->b_xflags & BX_BKGRDMARKER))
1374 return (bp);
1375 if ((bp = vp->v_dirtyblkroot) != NULL &&
1376 bp->b_lblkno == lblkno && !(bp->b_xflags & BX_BKGRDMARKER))
getblk+0x9c
0xc04def3c is in getblk (/usr/src/sys/kern/vfs_bio.c:2444).
2439 needsbuffer |= VFS_BIO_NEED_ANY;
2440 mtx_unlock(&nblock);
2441 }
2442
2443 VI_LOCK(vp);
2444 if ((bp = gbincore(vp, blkno))) {
2445 int lockflags;
2446 /*
2447 * Buffer is in-core. If the buffer is not busy, it must
2448 * be on a queue.
breadn+0x34
0xc04dbe04 is in breadn (/usr/src/sys/kern/vfs_bio.c:702).
697 {
698 struct buf *bp, *rabp;
699 int i;
700 int rv = 0, readwait = 0;
701
702 *bpp = bp = getblk(vp, blkno, size, 0, 0, 0);
703
704 /* if not found in cache, do some I/O */
705 if ((bp->b_flags & B_CACHE) == 0) {
706 if (curthread != PCPU_GET(idlethread))
bread+0x20
0xc04dbdcc is in bread (/usr/src/sys/kern/vfs_bio.c:685).
680 bread(struct vnode * vp, daddr_t blkno, int size, struct ucred * cred,
681 struct buf ** bpp)
682 {
683
684 return (breadn(vp, blkno, size, 0, 0, 0, cred, bpp));
685 }
686
687 /*
688 * Operates like bread, but also starts asynchronous I/O on
689 * read-ahead blocks. We must clear BIO_ERROR and B_INVAL prior
ffs_update+0x13c
0xc0528a6c is in ffs_update (/usr/src/sys/ufs/ffs/ffs_inode.c:110).
105 ip->i_din1->di_ouid = ip->i_uid; /* XXX */
106 ip->i_din1->di_ogid = ip->i_gid; /* XXX */
107 } /* XXX */
108 error = bread(ip->i_devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
109 (int)fs->fs_bsize, NOCRED, &bp);
110 if (error) {
111 brelse(bp);
112 return (error);
113 }
114 if (DOINGSOFTDEP(vp))
ufs_inactive+0x10b
0xc0541103 is in ufs_inactive (/usr/src/sys/ufs/ufs/ufs_inode.c:125).
120 if ((ip->i_flag & (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) == 0 &&
121 vn_write_suspend_wait(vp, NULL, V_NOWAIT)) {
122 ip->i_flag &= ~IN_ACCESS;
123 } else {
124 (void) vn_write_suspend_wait(vp, NULL, V_WAIT);
125 UFS_UPDATE(vp, 0);
126 }
127 }
128 out:
129 VOP_UNLOCK(vp, 0, td);
ufs_vnoperate+0x13
0xc054818f is in ufs_vnoperate (/usr/src/sys/ufs/ufs/ufs_vnops.c:2824).
2819 struct vop_generic_args /* {
2820 struct vnodeop_desc *a_desc;
2821 } */ *ap;
2822 {
2823 return (VOCALL(ufs_vnodeop_p, ap->a_desc->vdesc_offset, ap));
2824 }
2825
2826 int
2827 ufs_vnoperatefifo(ap)
2828 struct vop_generic_args /* {
vrele+0x104
0xc04ebd04 is in vrele (/usr/src/sys/kern/vfs_subr.c:1998).
1993 if (vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK, td) == 0) {
1994 VI_LOCK(vp);
1995 vp->v_iflag |= VI_DOINGINACT;
1996 VI_UNLOCK(vp);
1997 VOP_INACTIVE(vp, td);
1998 VI_LOCK(vp);
1999 KASSERT(vp->v_iflag & VI_DOINGINACT,
2000 ("vrele: lost VI_DOINGINACT"));
2001 vp->v_iflag &= ~VI_DOINGINACT;
2002 } else
exit1+0x47a
0xc04920a6 is in exit1 (/usr/src/sys/kern/kern_exit.c:371).
366 tracecred = p->p_tracecred;
367 p->p_tracecred = NULL;
368 mtx_unlock(&ktrace_mtx);
369 PROC_UNLOCK(p);
370 if (tracevp != NULL)
371 vrele(tracevp);
372 if (tracecred != NULL)
373 crfree(tracecred);
374 #endif
375 /*
syscall+0x129
0xc058eff9 is in syscall (/usr/src/sys/i386/i386/trap.c:1004).
999
1000 STOPEVENT(p, S_SCE, narg);
1001
1002 PTRACESTOP_SC(p, td, S_PT_SCE);
1003
1004 error = (*callp->sy_call)(td, args);
1005 }
1006
1007 switch (error) {
1008 case 0:
Xint0x80_syscall+0x1d
0xc057e4ed is at {standard input}:138.
133 {standard input}: No such file or directory.
in {standard input}
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-current
mailing list