panic: lock (sleep mutex) vnode interlock not locked _at_ /usr/src/sys/kern/vfs_subr.c:750

From: Pawel Worach <pawel.worach_at_gmail.com>
Date: Thu, 4 Aug 2005 20:16:29 +0200
Hi Jeff, list,

Similar panic was reported some time ago with an almost identical stack trace.
This also happened while updating src/ sources using cvs. I can't
repro it on demand.

FreeBSD 7.0-CURRENT #0: Thu Aug  4 04:18:30 CEST 2005 with sources
from about four hours earlier. Hardware is dual Xeon + HTT, SMP
kernel, no INVARIANTS or WITNESS.
# ident /sys/kern/vfs_subr.c
/sys/kern/vfs_subr.c:
     $FreeBSD: src/sys/kern/vfs_subr.c,v 1.637 2005/08/03 05:36:50 jeff Exp $

panic: lock (sleep mutex) vnode interlock not locked _at_
/usr/src/sys/kern/vfs_subr.c:750
cpuid = 0
KDB: stack backtrace:
kdb_backtrace(c06d5257,0,c06bf853,e5108c14,c23a8a80) at kdb_backtrace+0x2e
panic(c06bf853,c06cf69c,c06bf19a,c06c48b6,2ee) at panic+0x139
witness_unlock(c472e8fc,8,c06c48b6,2ee,c472e880) at witness_unlock+0xda
_mtx_unlock_flags(c472e8fc,0,c06c48b6,2ee,c472e880) at _mtx_unlock_flags+0x8a
vdestroy(c472e880,0,c472e880,c472e880,c472e880) at vdestroy+0x237
vdropl(c472e880,e5108cb4,c06c48b6,24e,7) at vdropl+0x50
vlrureclaim(c25ec800,0,c06c48b6,2b1,3e8) at vlrureclaim+0x262
vnlru_proc(0,e5108d38,c06b8f6d,30d,0) at vnlru_proc+0x20d
fork_exit(c057d3e0,0,e5108d38) at fork_exit+0xc1
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xe5108d6c, ebp = 0 ---
Uptime: 15h3m41s
Dumping 1023 MB (2 chunks)
  chunk 0: 1MB (157 pages) ... ok
  chunk 1: 1023MB (261851 pages) 1007 991 975 959 943 927 911 895 879
863 847 831 815 799 783 767 751 735 719 703 687 671 655 639 623 607
591 575 559 543 527 511 495 479 463 447 431 415 399 383 367 351 335
319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31
15

(kgdb) bt
#0  doadump () at pcpu.h:165
#1  0xc051695a in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:397
#2  0xc0516d34 in panic (fmt=0xc06bf853 "lock (%s) %s not locked _at_ %s:%d")
    at /usr/src/sys/kern/kern_shutdown.c:553
#3  0xc054201a in witness_unlock (lock=0xc472e8fc, flags=8,
    file=0xc06c48b6 "/usr/src/sys/kern/vfs_subr.c", line=750)
    at /usr/src/sys/kern/subr_witness.c:1133
#4  0xc050c86a in _mtx_unlock_flags (m=0xc472e8fc, opts=0,
    file=0xc06c48b6 "/usr/src/sys/kern/vfs_subr.c", line=750)
    at /usr/src/sys/kern/kern_mutex.c:297
#5  0xc057d907 in vdestroy (vp=0xc472e880) at /usr/src/sys/kern/vfs_subr.c:750
#6  0xc0580500 in vdropl (vp=0xc472e880) at /usr/src/sys/kern/vfs_subr.c:2110
#7  0xc057d182 in vlrureclaim (mp=0xc25ec800)
    at /usr/src/sys/kern/vfs_subr.c:593
#8  0xc057d5ed in vnlru_proc () at /usr/src/sys/kern/vfs_subr.c:693
#9  0xc04fdd41 in fork_exit (callout=0xc057d3e0 <vnlru_proc>, arg=0x0,
    frame=0x0) at /usr/src/sys/kern/kern_fork.c:789
#10 0xc067716c in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:208
(kgdb) frame 5
#5  0xc057d907 in vdestroy (vp=0xc472e880) at /usr/src/sys/kern/vfs_subr.c:750
750             VI_UNLOCK(vp);
(kgdb) print *vp
$1 = {v_type = VBAD, v_tag = 0xc06b46ed "none", v_op = 0xc06e56a0,
  v_data = 0x0, v_mount = 0x0, v_nmntvnodes = {tqe_next = 0x0,
    tqe_prev = 0xc3140ab4}, v_un = {vu_mount = 0x0, vu_socket = 0x0,
    vu_cdev = 0x0, vu_fifoinfo = 0x0}, v_hashlist = {le_next = 0xc4ad7440,
    le_prev = 0xc24af9bc}, v_hash = 200297, v_cache_src = {lh_first = 0x0},
  v_cache_dst = {tqh_first = 0x0, tqh_last = 0xc472e8b0}, v_dd = 0x0,
  v_cstart = 0, v_lasta = 0, v_lastw = 0, v_clen = 0, v_lock = {
    lk_interlock = 0xc0713238, lk_flags = 64, lk_sharecount = 0,
    lk_waitcount = 0, lk_exclusivecount = 0, lk_prio = 80,
    lk_wmesg = 0xc06c2905 "ufs", lk_timo = 51, lk_lockholder = 0xffffffff,
    lk_newlock = 0x0}, v_interlock = {mtx_object = {lo_class = 0xc06ec084,
      lo_name = 0xc06bf19a "vnode interlock",
      lo_type = 0xc06bf19a "vnode interlock", lo_flags = 196608, lo_list = {
        tqe_next = 0xc4a028fc, tqe_prev = 0xc533c19c},
      lo_witness = 0xc0724b10}, mtx_lock = 4, mtx_recurse = 0},
  v_vnlock = 0xc472e8d8, v_holdcnt = 0, v_usecount = 0, v_iflag = 128,
  v_vflag = 0, v_writecount = 0, v_freelist = {tqe_next = 0xc3c37770,
    tqe_prev = 0xc0762170}, v_bufobj = {bo_mtx = 0xc472e8fc, bo_clean = {
      bv_hd = {tqh_first = 0x0, tqh_last = 0xc472e944}, bv_root = 0x0,
      bv_cnt = 0}, bo_dirty = {bv_hd = {tqh_first = 0x0,
        tqh_last = 0xc472e954}, bv_root = 0x0, bv_cnt = 0}, bo_numoutput = 0,
    bo_flag = 0, bo_ops = 0xc06f2f64, bo_bsize = 16384, bo_object = 0x0,
    bo_synclist = {le_next = 0x0, le_prev = 0x0}, bo_private = 0xc472e880,
    __bo_vnode = 0xc472e880}, v_pollinfo = 0x0, v_label = 0x0}
(kgdb) list
745             VNASSERT(bo->bo_clean.bv_root == NULL, vp,
("cleanblkroot not NULL"));
746             VNASSERT(bo->bo_dirty.bv_cnt == 0, vp, ("dirtybufcnt not 0"));
747             VNASSERT(bo->bo_dirty.bv_root == NULL, vp,
("dirtyblkroot not NULL"));
748             VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has
namecache dst"));
749             VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has
namecache src"));
750             VI_UNLOCK(vp);
751     #ifdef MAC
752             mac_destroy_vnode(vp);
753     #endif
754             if (vp->v_pollinfo != NULL) {
(kgdb)

vmcore and kernel.debug archived in case more info is needed.

-- 
Pawel
Received on Thu Aug 04 2005 - 16:16:31 UTC

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