mkn@shrewd$ cat /etc/motd FreeBSD 6.1-RELEASE (SHREWD) #0: Tue May 16 02:09:20 BST 2006 mkn@shrewd$ uname -a FreeBSD shrewd.pub.knigma.org 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Tue May 16 02:09:20 BST 2006 root@shrewd.pub.knigma.org:/usr/obj/usr/src/sys/SHREWD i386 mkn@shrewd$ sudo kgdb -c /var/crash/vmcore.44 kernel.debug [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode fault virtual address = 0x7b fault code = supervisor read, page not present instruction pointer = 0x20:0xc05e0402 stack pointer = 0x28:0xd15e4870 frame pointer = 0x28:0xd15e4894 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 7458 (cvs) trap number = 12 panic: page fault Uptime: 49d9h32m37s Dumping 255 MB (2 chunks) chunk 0: 1MB (159 pages) ... ok chunk 1: 255MB (65216 pages) 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15 #0 doadump () at pcpu.h:165 165 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); (kgdb) bt #0 doadump () at pcpu.h:165 #1 0xc0576c47 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:402 #2 0xc0576f89 in panic (fmt=0xc078901d "%s") at /usr/src/sys/kern/kern_shutdown.c:558 #3 0xc07601ac in trap_fatal (frame=0xd15e4830, eva=0) at /usr/src/sys/i386/i386/trap.c:836 #4 0xc075fe82 in trap_pfault (frame=0xd15e4830, usermode=0, eva=123) at /usr/src/sys/i386/i386/trap.c:744 #5 0xc075fa3f in trap (frame= {tf_fs = -953221112, tf_es = -953221080, tf_ds = 2097192, tf_edi = 1, tf_esi = 4, tf_ebp = -782350188, tf_isp = -782350244, tf_ebx = -1019884624, tf_edx = 4, tf_ecx = -1019884500, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1067580414, tf_cs = 32, tf_eflags = 66182, tf_esp = -1019884624, tf_ss = 0}) at /usr/src/sys/i386/i386/trap.c:434 #6 0xc074c8fa in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #7 0xc05e0402 in vnlru_free (count=1) at /usr/src/sys/kern/vfs_subr.c:677 #8 0xc05e0c49 in getnewvnode (tag=0xc07a24ed "ufs", mp=0xc23c8800, vops=0x0, vpp=0x0) at /usr/src/sys/kern/vfs_subr.c:876 #9 0xc06eae66 in ffs_vget (mp=0xc23c8800, ino=1277857, flags=2, vpp=0xd15e499c) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1250 #10 0xc06f367e in ufs_lookup (ap=0xd15e4a40) at /usr/src/sys/ufs/ufs/ufs_lookup.c:572 #11 0xc07746fe in VOP_CACHEDLOOKUP_APV (vop=0x0, a=0x4) at vnode_if.c:150 #12 0xc05d4901 in vfs_cache_lookup (ap=0x0) at vnode_if.h:82 #13 0xc0774674 in VOP_LOOKUP_APV (vop=0xc07f3060, a=0xd15e4aec) at vnode_if.c:99 #14 0xc05d9feb in lookup (ndp=0xd15e4b94) at vnode_if.h:56 #15 0xc05d9758 in namei (ndp=0xd15e4b94) at /usr/src/sys/kern/vfs_lookup.c:203 #16 0xc05ec0ef in kern_lstat (td=0xc2763300, path=0x4
, pathseg=4, sbp=0x0) at /usr/src/sys/kern/vfs_syscalls.c:2125 #17 0xc05ec06f in lstat (td=0x0, uap=0xd15e4d04) at /usr/src/sys/kern/vfs_syscalls.c:2109 #18 0xc07605a0 in syscall (frame= {tf_fs = 135004219, tf_es = 135266363, tf_ds = -1078001605, tf_edi = 135109632, tf_esi = 135308160, tf_ebp = -1077943192, tf_isp = -782348956, tf_ebx = -1077943312, tf_edx = -1077942272, tf_ecx = 135308424, tf_eax = 190, tf_trapno = 12, tf_err = 2, tf_eip = 674766963, tf_cs = 51, tf_eflags = 642, tf_esp = -1077943348, tf_ss = 59}) at /usr/src/sys/i386/i386/trap.c:981 #19 0xc074c94f in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:200 #20 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) quit #7 0xc05e0402 in vnlru_free (count=1) at /usr/src/sys/kern/vfs_subr.c:677 677 vfslocked = VFS_LOCK_GIANT(vp->v_mount); Current language: auto; currently c (kgdb) list 672 freevnodes--; 673 vp->v_iflag &= ~VI_FREE; 674 vholdl(vp); 675 mtx_unlock(&vnode_free_list_mtx); 676 VI_UNLOCK(vp); 677 vfslocked = VFS_LOCK_GIANT(vp->v_mount); 678 vtryrecycle(vp); 679 VFS_UNLOCK_GIANT(vfslocked); 680 /* 681 * If the recycled succeeded this vdrop will actually free (kgdb) p *(vp) $3 = {v_type = VBAD, v_tag = 0xc0791704 "none", v_op = 0xc07d89e0, v_data = 0x0, v_mount = 0x0, v_nmntvnodes = {tqe_next = 0x0, tqe_prev = 0xc3250014}, v_un = {vu_mount = 0x0, vu_socket = 0x0, vu_cdev = 0x0, vu_fifoinfo = 0x0}, v_hashlist = {le_next = 0x0, le_prev = 0xc295f570}, v_hash = 3269747, v_cache_src = {lh_first = 0x0}, v_cache_dst = {tqh_first = 0x0, tqh_last = 0xc335cbe0}, v_dd = 0x0, v_cstart = 0, v_lasta = 0, v_lastw = 0, v_clen = 0, v_lock = {lk_interlock = 0xc08073dc, lk_flags = 64, lk_sharecount = 0, lk_waitcount = 0, lk_exclusivecount = 0, lk_prio = 80, lk_wmesg = 0xc07a24ed "ufs", lk_timo = 51, lk_lockholder = 0xffffffff, lk_newlock = 0x0}, v_interlock = {mtx_object = {lo_class = 0xc07e0644, lo_name = 0xc07a3a55 "vnode interlock", lo_type = 0xc07a3a55 "vnode interlock", lo_flags = 196608, lo_list = {tqe_next = 0x0, tqe_prev = 0x0}, lo_witness = 0x0}, mtx_lock = 4, mtx_recurse = 0}, v_vnlock = 0xc335cc08, v_holdcnt = 1, v_usecount = 0, v_iflag = 128, v_vflag = 0, v_writecount = 0, v_freelist = { tqe_next = 0xc3248990, tqe_prev = 0xc080d22c}, v_bufobj = {bo_mtx = 0xc335cc2c, bo_clean = {bv_hd = { tqh_first = 0x0, tqh_last = 0xc335cc74}, bv_root = 0x0, bv_cnt = 0}, bo_dirty = {bv_hd = { tqh_first = 0x0, tqh_last = 0xc335cc84}, bv_root = 0x0, bv_cnt = 0}, bo_numoutput = 0, bo_flag = 0, bo_ops = 0xc07e6564, bo_bsize = 8192, bo_object = 0x0, bo_synclist = {le_next = 0x0, le_prev = 0x0}, bo_private = 0xc335cbb0, __bo_vnode = 0xc335cbb0}, v_pollinfo = 0x0, v_label = 0x0} (kgdb) p *(vp->v_mount) Cannot access memory at address 0x0 (kgdb)