FreeBSD 7.1 Crash dump with WITNESS

Karim Fodil-Lemelin kfl at xiplink.com
Thu Apr 2 15:57:32 PDT 2009


Hi,

I got this crash while running tcpdump and saving to a file. I can't 
reproduce it consistently but perhaps someone can give me some pointers 
on how to fix this. It looks like the witness code is in some infinite 
loop and that get stopped by an MPASS check.

(kgdb) bt
#0  kdb_enter_why (why=0xc092cefd "panic", msg=0xc092cefd "panic")
    at ../../../kern/subr_kdb.c:316
#1  0xc06a69c6 in panic (fmt=0xc091345b "Assertion %s failed at %s:%d")
    at ../../../kern/kern_shutdown.c:557
#2  0xc06e1e22 in isitmydescendant (parent=0xc0a2a208, child=0xc0a2c468)
    at ../../../kern/subr_witness.c:1634
#3  0xc06e1e33 in isitmydescendant (parent=0xc0a2ac80, child=0xc0a2c468)
    at ../../../kern/subr_witness.c:1636
#4  0xc06e1e33 in isitmydescendant (parent=0xc0a2abe0, child=0xc0a2c468)
    at ../../../kern/subr_witness.c:1636
#5  0xc06e1e33 in isitmydescendant (parent=0xc0a2ac08, child=0xc0a2c468)
    at ../../../kern/subr_witness.c:1636
#6  0xc06e3f82 in witness_checkorder (lock=0xca37c2d0, flags=Variable 
"flags" is
 not available.
)
    at ../../../kern/subr_witness.c:1019
#7  0xc0698705 in _mtx_lock_flags (m=0xca37c2d0, opts=0,
    file=0xc091253f "../../../dev/e1000/if_em.c", line=1136)
    at ../../../kern/kern_mutex.c:183
#8  0xc0527f18 in em_ioctl (ifp=0xca394c00, command=2149607696,
    data=0xf572fa04 ",\226\2235\226\2230rU:n\003\210@")
    at ../../../dev/e1000/if_em.c:1136
#9  0xc073eb91 in if_setflag (ifp=0xca394c00, flag=256, pflag=131072,
    refcount=0xca394c44, onswitch=0) at ../../../net/if.c:2098
#10 0xc073ec6a in ifpromisc (ifp=0xca394c00, pswitch=0)
    at ../../../net/if.c:2125
#11 0xc0738083 in bpf_detachd (d=0xcb262f00) at ../../../net/bpf.c:379
#12 0xc0739664 in bpfclose (dev=0xcb0ddd00, flags=3, fmt=8192, 
td=0xcb087230)
    at ../../../net/bpf.c:452
#13 0xc0633845 in devfs_close (ap=0xf572fb30)
    at ../../../fs/devfs/devfs_vnops.c:460
#14 0xc08d0306 in VOP_CLOSE_APV (vop=0xc09c52c0, a=0xf572fb30)
    at vnode_if.c:415
#15 0xc073427b in vn_close (vp=0xcb27f420, flags=3, file_cred=0xcb279300,
    td=0xcb087230) at vnode_if.h:228
#16 0xc0734389 in vn_closefile (fp=0xcaae44c0, td=0xcb087230)
    at ../../../kern/vfs_vnops.c:867
#17 0xc0630b9c in devfs_close_f (fp=0xcaae44c0, td=0xcb087230)
    at ../../../fs/devfs/devfs_vnops.c:479
#18 0xc0675a79 in fdrop (fp=0xcaae44c0, td=0xcb087230) at file.h:299
#19 0xc06777b9 in closef (fp=0xcaae44c0, td=0xcb087230)
    at ../../../kern/kern_descrip.c:2033
#20 0xc0677b67 in kern_close (td=0xcb087230, fd=3)
---Type <return> to continue, or q <return> to quit---
    at ../../../kern/kern_descrip.c:1125
#21 0xc0677bff in close (td=0xcb087230, uap=0xf572fcfc)
    at ../../../kern/kern_descrip.c:1077
#22 0xc08c3cdf in syscall (frame=0xf572fd38) at 
../../../i386/i386/trap.c:1076
#23 0xc08aa9fa in Xlcall_syscall () at ../../../i386/i386/exception.s:229
#24 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb) up
#1  0xc06a69c6 in panic (fmt=0xc091345b "Assertion %s failed at %s:%d")
    at ../../../kern/kern_shutdown.c:557
557                     kdb_enter_why(KDB_WHY_PANIC, "panic");
(kgdb)
#2  0xc06e1e22 in isitmydescendant (parent=0xc0a2a208, child=0xc0a2c468)
    at ../../../kern/subr_witness.c:1634
1634                    MPASS(j < 1000);
(kgdb) p j
$1 = 1000
(kgdb)

(kgdb) p *child
$2 = {w_name = 0xc0932551 "bpf global lock", w_class = 0xc09ceb04, 
w_list = {
    stqe_next = 0xc0a2c490}, w_typelist = {stqe_next = 0xc0a2c490},
  w_children = 0xc0a4c640, w_file = 0xc0939635 "net/bpf.c", w_line = 452,
  w_level = 0, w_refcount = 2, w_Giant_squawked = 0 '\0',
  w_other_squawked = 0 '\0', w_same_squawked = 0 '\0', w_displayed = 0 '\0'}



Anyone that can shed some light on this? Btw I've never witnessed that 
crash without WITNESS on ;).

Thanks!

Karim.


More information about the freebsd-net mailing list