Re: Fatal trap 12: page fault while in kernel mode [SEC=UNCLASSIFIED]

From: Wilkinson, Alex <alex.wilkinson_at_dsto.defence.gov.au>
Date: Thu, 7 Jan 2010 16:39:40 +0800
    0n Wed, Jan 06, 2010 at 10:44:34AM +0800, Wilkinson, Alex wrote: 

    >    0n Tue, Jan 05, 2010 at 08:28:49AM -0500, John Baldwin wrote: 
    >
    >    >Are you able to get a crashdump and examine it with kgdb?
    >
    >rebuilt world+kernel and overwrote kernel.debug :(
    >when it happens again I will get a bt from kgdb(1).

OK, from: FreeBSD 9.0-CURRENT #3 r201546: Tue Jan  5 15:51:52 WST 2010

Looks like something with VM subsystem is causing this.

   Kernel page fault with the following non-sleepable locks held:
   exclusive sleep mutex vm page queue free mutex (vm page queue free mutex) r = 0 (0xc0f6c300) locked _at_ /usr/src/sys/vm/vm_page.c:1052
   exclusive sleep mutex vm object (standard object) r = 0 (0xc207c000) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e8878954,c08d26e5,c0cc176e,10d,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c0cc176e,10d,ffffffff,c0f31e64,e887898c,...) at kdb_backtrace+0x29
   _witness_debugger(c0c9d73e,e88789a0,4,1,0,...) at _witness_debugger+0x25
   witness_warn(5,0,c0cd219f,c0c1b84e,c6737000,...) at witness_warn+0x1fd
   trap(e8878a2c) at trap+0x19e
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0xc0b04452, esp = 0xe8878a6c, ebp = 0xe8878ac0 ---
   vm_reserv_alloc_page(c207c000,707b,0,37e,c207c000,...) at vm_reserv_alloc_page+0x102
   vm_page_alloc(c207c000,707b,0,40,e8878c0c,...) at vm_page_alloc+0x25e
   vm_fault(c686fae0,30dff000,2,0,30dff004,...) at vm_fault+0x575
   trap_pfault(5,0,c0cd219f,4,c6737000,...) at trap_pfault+0x10d
   trap(e8878d38) at trap+0x2d0
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0x2834ec95, esp = 0xbfbfe4d4, ebp = 0xbfbfe4e8 ---
   
   Fatal trap 12: page fault while in kernel mode
   cpuid = 2; apic id = 02
   fault virtual address   = 0xc445d070
   fault code     = supervisor read, page not present
   instruction pointer  = 0x20:0xc0b04452
   stack pointer          = 0x28:0xe8878a6c
   frame pointer          = 0x28:0xe8878ac0
   code segment      = base 0x0, limit 0xfffff, type 0x1b
            = DPL 0, pres 1, def32 1, gran 1
   processor eflags  = interrupt enabled, resume, IOPL = 3
   current process      = 1455 (initial thread)
   [thread pid 1455 tid 100081 ]
   Stopped at      vm_reserv_alloc_page+0x102:     cmpl    %eax,0x10(%esi)
   
   
   lock order reversal: (Giant after non-sleepable)
    1st 0xc0f6c300 vm page queue free mutex (vm page queue free mutex) _at_ /usr/src/sys/vm/vm_page.c:1052
    2nd 0xc0df2f50 Giant (Giant) _at_ /usr/src/sys/dev/usb/input/ukbd.c:1594
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e88787a4,c08d26e5,c08c339b,c0c9e192,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c08c339b,c0c9e192,c612b5f0,c612a1a0,e8878800,...) at kdb_backtrace+0x29
   _witness_debugger(c0c9e192,c0df2f50,c0cba2ee,c612a1a0,c0c897f0,...) at _witness_debugger+0x25
   witness_checkorder(c0df2f50,9,c0c897f0,63a,0,...) at witness_checkorder+0x839
   _mtx_lock_flags(c0df2f50,0,c0c897f0,63a,c6758570,...) at _mtx_lock_flags+0xc4
   ukbd_poll(c6a48000,1,c68d0000,1,e8878880,...) at ukbd_poll+0x48
   kbdmux_poll(c6181900,1,c68d0084,c0df1bc8,1,...) at kbdmux_poll+0x46
   sc_cngetc(c0d3f3e0,78,e8878898,c084f076,e88788b8,...) at sc_cngetc+0xc3
   cncheckc(e88788b8,c04d20a5,c0c4070b,c04d3350,e88788b4,...) at cncheckc+0x3a
   cngetc(c0c4070b,c04d3350,e88788b4,e88788f0,1,...) at cngetc+0x16
   db_readline(c0dc12e0,78,e88788d4,c04d0ce6,c0c4070b,...) at db_readline+0x75
   db_read_line(c0c4070b,e8878928,c04d2b9d,c0cce2ae,3,...) at db_read_line+0x1a
   db_command_loop(c0cce2ae,3,0,e887890c,0,...) at db_command_loop+0x46
   db_trap(c,0,b,28,e8878a2c,...) at db_trap+0xdd
   kdb_trap(c,0,e8878a2c,1,1,...) at kdb_trap+0x96
   trap_fatal(5,0,c0cd219f,c0c1b84e,c6737000,...) at trap_fatal+0x2ef
   trap(e8878a2c) at trap+0x1ac
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0xc0b04452, esp = 0xe8878a6c, ebp = 0xe8878ac0 ---
   vm_reserv_alloc_page(c207c000,707b,0,37e,c207c000,...) at vm_reserv_alloc_page+0x102
   vm_page_alloc(c207c000,707b,0,40,e8878c0c,...) at vm_page_alloc+0x25e
   vm_fault(c686fae0,30dff000,2,0,30dff004,...) at vm_fault+0x575
   trap_pfault(5,0,c0cd219f,4,c6737000,...) at trap_pfault+0x10d
   trap(e8878d38) at trap+0x2d0
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0x2834ec95, esp = 0xbfbfe4d4, ebp = 0xbfbfe4e8 ---
   
   db> bt
   Tracing pid 1455 tid 100081 td 0xc6739900
   vm_reserv_alloc_page(c207c000,707b,0,37e,c207c000,...) at vm_reserv_alloc_page+0x102
   vm_page_alloc(c207c000,707b,0,40,e8878c0c,...) at vm_page_alloc+0x25e
   vm_fault(c686fae0,30dff000,2,0,30dff004,...) at vm_fault+0x575
   trap_pfault(5,0,c0cd219f,4,c6737000,...) at trap_pfault+0x10d
   trap(e8878d38) at trap+0x2d0
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0x2834ec95, esp = 0xbfbfe4d4, ebp = 0xbfbfe4e8 ---
   db> 
   
   db> show alllocks
   Process 36147 (sh) thread 0xc6738900 (100102)
   exclusive sleep mutex vm object (standard object) r = 0 (0xc9f1d110) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc71b0958) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   Process 36146 (as) thread 0xcb9dab40 (100400)
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5e75928) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xc9047388) locked _at_ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1505
   exclusive lockmgr ufs (ufs) r = 0 (0xca096388) locked _at_ /usr/src/sys/kern/vfs_lookup.c:497
   Process 36143 (cc1) thread 0xcbf38d80 (100626)
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5dcbbd0) locked _at_ /usr/src/sys/kern/vfs_bio.c:1835
   shared lockmgr ufs (ufs) r = 0 (0xcad59e28) locked _at_ /usr/src/sys/kern/vfs_vnops.c:536
   Process 36110 (cc1) thread 0xcbf2d900 (100527)
   exclusive sleep mutex vm object (standard object) r = 0 (0xca692110) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc6d02c10) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   Process 35791 (make) thread 0xcbf44d80 (100674)
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5e4f8e0) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xcaecc058) locked _at_ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1505
   exclusive lockmgr ufs (ufs) r = 0 (0xc6d586b8) locked _at_ /usr/src/sys/kern/vfs_subr.c:2091
   Process 8744 (syslogd) thread 0xc6b446c0 (100130)
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5ea03d0) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xc6c01278) locked _at_ /usr/src/sys/kern/vfs_vnops.c:607
   Process 4011 (VirtualBox) thread 0xc6dca900 (100268)
   exclusive sleep mutex process lock (process lock) r = 0 (0xc7565330) locked _at_ /usr/src/sys/kern/kern_sig.c:1189
   Process 1474 (gnome-pty-helper) thread 0xc7130240 (100195)
   exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc712a898) locked _at_ /usr/src/sys/kern/uipc_sockbuf.c:148
   Process 1471 (urxvtd) thread 0xc6de2000 (100193)
   exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc6e6d228) locked _at_ /usr/src/sys/kern/uipc_sockbuf.c:148
   Process 1464 (tilda) thread 0xc6d55480 (100186)
   exclusive sleep mutex vm object (standard object) r = 0 (0xc7723088) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc6b4a048) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   Process 1455 (Xorg) thread 0xc6739900 (100081)
   exclusive sleep mutex vm page queue free mutex (vm page queue free mutex) r = 0 (0xc0f6c300) locked _at_ /usr/src/sys/vm/vm_page.c:1052
   exclusive sleep mutex vm object (standard object) r = 0 (0xc207c000) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc686fb28) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   Process 14 (usb) thread 0xc6487240 (100045)
   exclusive sx 123456789ABCDEF - USB device SX lock (123456789ABCDEF - USB device SX lock) r = 0 (0xc6722428) locked _at_ /usr/src/sys/dev/usb/usb_request.c:322
   db> 

Why doesn't this panic and write a core ? I seem to have to use "call doadump" always.

   db> panic
   panic: from debugger
   cpuid = 2
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e8878768,c08978bd,c0df8280,0,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c0df8280,0,c0c988b2,17b,c6739900,...) at kdb_backtrace+0x29
   mi_switch(100,0,c0c9997c,98c,2,...) at mi_switch+0x12d
   sched_bind(c6739900,0,c0c97cc0,118,e88787cc,...) at sched_bind+0x8a
   boot(c0c97e06,c0c97e06,c0c4065c,e8878804,2,...) at boot+0x47
   panic(c0c4065c,e88788c8,c04d0ba1,c0b04452,0,...) at panic+0x152
   db_panic(c0b04452,0,ffffffff,e8878840,1,...) at db_panic+0x17
   db_command(c0c4070b,e8878928,c04d2b9d,c0cce2ae,3,...) at db_command+0x381
   db_command_loop(c0cce2ae,3,0,e887890c,0,...) at db_command_loop+0x5a
   db_trap(c,0,b,28,e8878a2c,...) at db_trap+0xdd
   kdb_trap(c,0,e8878a2c,1,1,...) at kdb_trap+0x96
   trap_fatal(5,0,c0cd219f,c0c1b84e,c6737000,...) at trap_fatal+0x2ef
   trap(e8878a2c) at trap+0x1ac
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0xc0b04452, esp = 0xe8878a6c, ebp = 0xe8878ac0 ---
   vm_reserv_alloc_page(c207c000,707b,0,37e,c207c000,...) at vm_reserv_alloc_page+0x102
   vm_page_alloc(c207c000,707b,0,40,e8878c0c,...) at vm_page_alloc+0x25e
   vm_fault(c686fae0,30dff000,2,0,30dff004,...) at vm_fault+0x575
   trap_pfault(5,0,c0cd219f,4,c6737000,...) at trap_pfault+0x10d
   trap(e8878d38) at trap+0x2d0
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0x2834ec95, esp = 0xbfbfe4d4, ebp = 0xbfbfe4e8 ---
   
   db> call doadump
   Physical memory: 2005 MB
   Dumping 267 MB: 252 236 220 204 188 172 156 140 124 108 92 76 60 44 28 12
   Dump complete
   = 0xf
   
   db> reset
   cpu_reset: Restarting BSP
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e8878770,c08978bd,c0df8280,0,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c0df8280,0,c0c988b2,17b,0,...) at kdb_backtrace+0x29
   mi_switch(60b,0,c0c9997c,815,2,...) at mi_switch+0x12d
   sched_preempt(c6739900,2,0,e88787fc,c0ba92de,...) at sched_preempt+0xb5
   ipi_bitmap_handler(e8870008,e8870028,c07e0028,c0ce4b30,c0c6e3af,...) at ipi_bitmap_handler+0x34
   Xipi_intr_bitmap_handler() at Xipi_intr_bitmap_handler+0x2e
   --- interrupt, eip = 0xc0bc8e17, esp = 0xe88787f0, ebp = 0xe88787fc ---
   cpu_reset(e88788c8,c04d0ba1,c0b04452,0,ffffffff,...) at cpu_reset+0xc7
   db_reset(c0b04452,0,ffffffff,e8878840,1,...) at db_reset+0x8
   db_command(c0c4070b,e8878928,c04d2b9d,c0cce2ae,3,...) at db_command+0x381
   db_command_loop(c0cce2ae,3,0,e887890c,0,...) at db_command_loop+0x5a
   db_trap(c,0,b,28,e8878a2c,...) at db_trap+0xdd
   kdb_trap(c,0,e8878a2c,1,1,...) at kdb_trap+0x96
   trap_fatal(5,0,c0cd219f,c0c1b84e,c6737000,...) at trap_fatal+0x2ef
   trap(e8878a2c) at trap+0x1ac
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0xc0b04452, esp = 0xe8878a6c, ebp = 0xe8878ac0 ---
   vm_reserv_alloc_page(c207c000,707b,0,37e,c207c000,...) at vm_reserv_alloc_page+0x102
   vm_page_alloc(c207c000,707b,0,40,e8878c0c,...) at vm_page_alloc+0x25e
   vm_fault(c686fae0,30dff000,2,0,30dff004,...) at vm_fault+0x575
   trap_pfault(5,0,c0cd219f,4,c6737000,...) at trap_pfault+0x10d
   trap(e8878d38) at trap+0x2d0
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0x2834ec95, esp = 0xbfbfe4d4, ebp = 0xbfbfe4e8 ---
   db> 
   db> reset 
   cpu_reset: Stopping other CPUs

Machine is in a 100% hung state here (frozen). Had to do a 'hard reset' at this point.

Upon bootstrap (once background fsck kicked in) I got lots of LORs:

   login: lock order reversal:
    1st 0xc68e4c08 pseudofs (pseudofs) _at_ /usr/src/sys/kern/vfs_subr.c:2091
    2nd 0xc0df30fc allproc (allproc) _at_ /usr/src/sys/kern/kern_proc.c:283
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e888c79c,c08d26e5,c08c339b,c0c9e192,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c08c339b,c0c9e192,c6131be8,c612a0d0,e888c7f8,...) at kdb_backtrace+0x29
   _witness_debugger(c0c9e192,c0df30fc,c0c97034,c612a0d0,c0c96f07,...) at _witness_debugger+0x25
   witness_checkorder(c0df30fc,1,c0c96f07,11b,0,...) at witness_checkorder+0x839
   _sx_slock(c0df30fc,0,c0c96f07,11b,c6537180,...) at _sx_slock+0x85
   pfind(5ab,c6536ba0,4,c0c96593,c67ad900,...) at pfind+0x2f
   pfs_visible(0,0,c0c8d93e,7c,c68e4bb0,...) at pfs_visible+0x3a
   pfs_lookup(e888c8f4,c68e4bb0,e888cbd0,c68e4bb0,e888c914,...) at pfs_lookup+0x3dd
   VOP_CACHEDLOOKUP_APV(c0d7f160,e888c8f4,e888cbd0,e888cbbc,c6dbc080,...) at VOP_CACHEDLOOKUP_APV+0xa5
   vfs_cache_lookup(e888c988,e888c988,e888cba4,200000,e888cba4,...) at vfs_cache_lookup+0xd6
   VOP_LOOKUP_APV(c0d7f160,e888c988,e888cbd0,30b,e888cbbc,...) at VOP_LOOKUP_APV+0xa5
   lookup(e888cba4,c0ca49af,ea,c5,c67abaa0,...) at lookup+0x66b
   namei(e888cba4,e888ca80,c0c927ae,5aa,0,...) at namei+0x55f
   vn_open_cred(e888cba4,e888cc5c,0,0,c6dbc080,...) at vn_open_cred+0x32f
   vn_open(e888cba4,e888cc5c,0,c6eb41f8,4,...) at vn_open+0x3b
   kern_openat(c67ad900,ffffff9c,2834c5e0,0,1,...) at kern_openat+0x11f
   kern_open(c67ad900,2834c5e0,0,0,0,...) at kern_open+0x35
   open(c67ad900,e888ccf8,c,c0c9b345,c0d820ec,...) at open+0x30
   syscall(e888cd38) at syscall+0x2a3
   Xint0x80_syscall() at Xint0x80_syscall+0x20
   --- syscall (5, FreeBSD ELF32, open), eip = 0x281ec473, esp = 0xbfbfe6fc, ebp = 0xbfbfe728 ---
   
   
   lock order reversal:
    1st 0xc6f28058 ufs (ufs) _at_ /usr/src/sys/ufs/ffs/ffs_snapshot.c:423
    2nd 0xc5fa6a04 bufwait (bufwait) _at_ /usr/src/sys/kern/vfs_bio.c:2559
    3rd 0xc68e4e28 ufs (ufs) _at_ /usr/src/sys/ufs/ffs/ffs_snapshot.c:544
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e8a013f4,c08d26e5,c08c339b,c0c9e1ab,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c08c339b,c0c9e1ab,c612dfc8,c61317d8,e8a01450,...) at kdb_backtrace+0x29
   _witness_debugger(c0c9e1ab,c68e4e28,c0c909c1,c61317d8,c0cbd7d2,...) at _witness_debugger+0x25
   witness_checkorder(c68e4e28,9,c0cbd7d2,220,0,...) at witness_checkorder+0x839
   __lockmgr_args(c68e4e28,80100,c68e4e48,0,0,...) at __lockmgr_args+0x824
   ffs_lock(e8a01574,c0f32620,c6dd62e4,80100,c68e4dd0,...) at ffs_lock+0x8a
   VOP_LOCK1_APV(c0da3d40,e8a01574,e8a01594,c0dbe5e0,c68e4dd0,...) at VOP_LOCK1_APV+0xb5
   _vn_lock(c68e4dd0,80100,c0cbd7d2,220,c6166600,...) at _vn_lock+0x5e
   ffs_snapshot(c68e6510,c6741c40,c0cbf137,168,246,...) at ffs_snapshot+0x150b
   ffs_mount(c68e6510,0,c0ca4bbf,3d6,0,...) at ffs_mount+0x154e
   vfs_donmount(c6dd6240,211100,c6dbcd00,c6dbcd00,bfbfeca4,...) at vfs_donmount+0x1012
   nmount(c6dd6240,e8a01cf8,c,c6dd6240,c0d849b8,...) at nmount+0x75
   syscall(e8a01d38) at syscall+0x2a3
   Xint0x80_syscall() at Xint0x80_syscall+0x20
   --- syscall (378, FreeBSD ELF32, nmount), eip = 0x280efaeb, esp = 0xbfbfeacc, ebp = 0xbfbfee18 ---
   
   
   lock order reversal:
    1st 0xc5fa6a04 bufwait (bufwait) _at_ /usr/src/sys/kern/vfs_bio.c:2559
    2nd 0xc6fcac9c snaplk (snaplk) _at_ /usr/src/sys/ufs/ffs/ffs_snapshot.c:793
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e8a013f4,c08d26e5,c08c339b,c0c9e192,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c08c339b,c0c9e192,c612dfc8,c6132200,e8a01450,...) at kdb_backtrace+0x29
   _witness_debugger(c0c9e192,c6fcac9c,c0cbd834,c6132200,c0cbd7d2,...) at _witness_debugger+0x25
   witness_checkorder(c6fcac9c,9,c0cbd7d2,319,c6f28078,...) at witness_checkorder+0x839
   __lockmgr_args(c6fcac9c,80400,c6f28078,0,0,...) at __lockmgr_args+0x824
   ffs_lock(e8a01574,0,0,80400,c6f28000,...) at ffs_lock+0x8a
   VOP_LOCK1_APV(c0da3d40,e8a01574,c2181a38,c0dbe5e0,c6f28000,...) at VOP_LOCK1_APV+0xb5
   _vn_lock(c6f28000,80400,c0cbd7d2,319,0,...) at _vn_lock+0x5e
   ffs_snapshot(c68e6510,c6741c40,c0cbf137,168,246,...) at ffs_snapshot+0x28b6
   ffs_mount(c68e6510,0,c0ca4bbf,3d6,0,...) at ffs_mount+0x154e
   vfs_donmount(c6dd6240,211100,c6dbcd00,c6dbcd00,bfbfeca4,...) at vfs_donmount+0x1012
   nmount(c6dd6240,e8a01cf8,c,c6dd6240,c0d849b8,...) at nmount+0x75
   syscall(e8a01d38) at syscall+0x2a3
   Xint0x80_syscall() at Xint0x80_syscall+0x20
   --- syscall (378, FreeBSD ELF32, nmount), eip = 0x280efaeb, esp = 0xbfbfeacc, ebp = 0xbfbfee18 ---
   
   lock order reversal:
    1st 0xc5e4285c bufwait (bufwait) _at_ /usr/src/sys/kern/vfs_bio.c:2559
    2nd 0xc680b600 dirhash (dirhash) _at_ /usr/src/sys/ufs/ufs/ufs_dirhash.c:285
   KDB: stack backtrace:
   db_trace_self_wrapper(c0c9b289,e89dc694,c08d26e5,c08c339b,c0c9e192,...) at db_trace_self_wrapper+0x26
   kdb_backtrace(c08c339b,c0c9e192,c612dfc8,c6131840,e89dc6f0,...) at kdb_backtrace+0x29
   _witness_debugger(c0c9e192,c680b600,c0cbfe15,c6131840,c0cbfaae,...) at _witness_debugger+0x25
   witness_checkorder(c680b600,9,c0cbfaae,11d,0,...) at witness_checkorder+0x839
   _sx_xlock(c680b600,0,c0cbfaae,11d,dcc8cb18,...) at _sx_xlock+0x85
   ufsdirhash_acquire(c7045cb0,dcc8cb18,e89dc7b8,c0ad8594,c6f9f244,...) at ufsdirhash_acquire+0x35
   ufsdirhash_move(c6f9f244,dcc8cb18,b18,b10,e89dc7a8,...) at ufsdirhash_move+0xf
   ufs_direnter(c6f40990,c7047440,e89dc800,e89dcbd0,0,...) at ufs_direnter+0x5f4
   ufs_makeinode(e89dcbd0,1,e89dcabc,e89dc948,c0bdee15,...) at ufs_makeinode+0x546
   ufs_create(e89dcabc,c612b2b0,c61317d8,1,0,...) at ufs_create+0x30
   VOP_CREATE_APV(c0da3d40,e89dcabc,e89dc9fc,c68fd7c3,e89dcabc,...) at VOP_CREATE_APV+0xa5
   VOP_CREATE_AP(e89dcabc,3ef,e89dc980,c08d248b,e89dcac0,...) at VOP_CREATE_AP+0x1b
   null_bypass(e89dcabc,e89dcad4,0,0,e89dcba4,...) at null_bypass+0xb3
   VOP_CREATE_APV(c68ff3c0,e89dcabc,e89dcbd0,e89dca54,0,...) at VOP_CREATE_APV+0xb3
   vn_open_cred(e89dcba4,e89dcc5c,180,0,c6dbdb00,...) at vn_open_cred+0x215
   vn_open(e89dcba4,e89dcc5c,180,c6eb4118,c0c98aa0,...) at vn_open+0x3b
   kern_openat(c69edd80,ffffff9c,bfbfe43b,0,a02,...) at kern_openat+0x11f
   kern_open(c69edd80,bfbfe43b,0,a01,180,...) at kern_open+0x35
   open(c69edd80,e89dccf8,c,c0c9e9d7,c0d820ec,...) at open+0x30
   syscall(e89dcd38) at syscall+0x2a3
   Xint0x80_syscall() at Xint0x80_syscall+0x20
   --- syscall (5, FreeBSD ELF32, open), eip = 0x2829b473, esp = 0xbfbfe00c, ebp = 0xbfbfe8a8 ---
  
kgdb(1) trace:. 

   #kgdb kernel.debug-20100106 vmcore.0
   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:
   itness_warn+0x1fd
   trap(e8878a2c) at trap+0x19e
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0xc0b04452, esp = 0xe8878a6c, ebp = 0xe8878ac0 ---
   vm_reserv_alloc_page(c207c000,707b,0,37e,c207c000,...) at vm_reserv_alloc_page+0x102
   vm_page_alloc(c207c000,707b,0,40,e8878c0c,...) at vm_page_alloc+0x25e
   vm_fault(c686fae0,30dff000,2,0,30dff004,...) at vm_fault+0x575
   trap_pfault(5,0,c0cd219f,4,c6737000,...) at trap_pfault+0x10d
   trap(e8878d38) at trap+0x2d0
   calltrap() at calltrap+0x6
   --- trap 0xc, eip = 0x2834ec95, esp = 0xbfbfe4d4, ebp = 0xbfbfe4e8 ---
   
   
   Fatal trap 12: page fault while in kernel mode
   cpuid = 2; apic id = 02
   fault virtual address	= 0xc445d070
   fault code		= supervisor read, page not present
   instruction pointer	= 0x20:0xc0b04452
   stack pointer	        = 0x28:0xe8878a6c
   frame pointer	        = 0x28:0xe8878ac0
   code segment		= base 0x0, limit 0xfffff, type 0x1b
   			= DPL 0, pres 1, def32 1, gran 1
   processor eflags	= interrupt enabled, resume, IOPL = 3
   current process		= 1455 (initial thread)
   lock order reversal: (Giant after non-sleepable)
    1st 0xc0f6c300 vm page queue free mutex (vm page queue free mutex) _at_ /usr/src/sys/vm/vm_page.c:1052
    2nd 0xc0df2f50 Giant (Giant) _at_ /usr/src/sys/dev/usb/input/ukbd.c:1594
   KDB: stack backtrace:
   exclusive sleep mutex vm object (standard object) r = 0 (0xc9f1d110) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc71b0958) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5e75928) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xc9047388) locked _at_ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1505
   exclusive lockmgr ufs (ufs) r = 0 (0xca096388) locked _at_ /usr/src/sys/kern/vfs_lookup.c:497
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5dcbbd0) locked _at_ /usr/src/sys/kern/vfs_bio.c:1835
   shared lockmgr ufs (ufs) r = 0 (0xcad59e28) locked _at_ /usr/src/sys/kern/vfs_vnops.c:536
   exclusive sleep mutex vm object (standard object) r = 0 (0xca692110) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc6d02c10) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5e4f8e0) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xcaecc058) locked _at_ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1505
   exclusive lockmgr ufs (ufs) r = 0 (0xc6d586b8) locked _at_ /usr/src/sys/kern/vfs_subr.c:2091
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5ea03d0) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xc6c01278) locked _at_ /usr/src/sys/kern/vfs_vnops.c:607
   exclusive sleep mutex process lock (process lock) r = 0 (0xc7565330) locked _at_ /usr/src/sys/kern/kern_sig.c:1189
   exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc712a898) locked _at_ /usr/src/sys/kern/uipc_sockbuf.c:148
   exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc6e6d228) locked _at_ /usr/src/sys/kern/uipc_sockbuf.c:148
   exclusive sleep mutex vm object (standard object) r = 0 (0xc7723088) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc6b4a048) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive sleep mutex vm page queue free mutex (vm page queue free mutex) r = 0 (0xc0f6c300) locked _at_ /usr/src/sys/vm/vm_page.c:1052
   exclusive sleep mutex vm object (standard object) r = 0 (0xc207c000) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc686fb28) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive sx 123456789ABCDEF - USB device SX lock (123456789ABCDEF - USB device SX lock) r = 0 (0xc6722428) locked _at_ /usr/src/sys/dev/usb/usb_request.c:322
   exclusive sleep mutex vm object (standard object) r = 0 (0xc9f1d110) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc71b0958) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5e75928) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xc9047388) locked _at_ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1505
   exclusive lockmgr ufs (ufs) r = 0 (0xca096388) locked _at_ /usr/src/sys/kern/vfs_lookup.c:497
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5dcbbd0) locked _at_ /usr/src/sys/kern/vfs_bio.c:1835
   shared lockmgr ufs (ufs) r = 0 (0xcad59e28) locked _at_ /usr/src/sys/kern/vfs_vnops.c:536
   exclusive sleep mutex vm object (standard object) r = 0 (0xca692110) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc6d02c10) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5e4f8e0) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xcaecc058) locked _at_ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1505
   exclusive lockmgr ufs (ufs) r = 0 (0xc6d586b8) locked _at_ /usr/src/sys/kern/vfs_subr.c:2091
   exclusive lockmgr bufwait (bufwait) r = 0 (0xc5ea03d0) locked _at_ /usr/src/sys/kern/vfs_bio.c:2559
   exclusive lockmgr ufs (ufs) r = 0 (0xc6c01278) locked _at_ /usr/src/sys/kern/vfs_vnops.c:607
   exclusive sleep mutex process lock (process lock) r = 0 (0xc7565330) locked _at_ /usr/src/sys/kern/kern_sig.c:1189
   exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc712a898) locked _at_ /usr/src/sys/kern/uipc_sockbuf.c:148
   exclusive sx so_rcv_sx (so_rcv_sx) r = 0 (0xc6e6d228) locked _at_ /usr/src/sys/kern/uipc_sockbuf.c:148
   exclusive sleep mutex vm object (standard object) r = 0 (0xc7723088) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc6b4a048) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive sleep mutex vm page queue free mutex (vm page queue free mutex) r = 0 (0xc0f6c300) locked _at_ /usr/src/sys/vm/vm_page.c:1052
   exclusive sleep mutex vm object (standard object) r = 0 (0xc207c000) locked _at_ /usr/src/sys/vm/vm_fault.c:269
   shared sx user map (user map) r = 0 (0xc686fb28) locked _at_ /usr/src/sys/vm/vm_map.c:3532
   exclusive sx 123456789ABCDEF - USB device SX lock (123456789ABCDEF - USB device SX lock) r = 0 (0xc6722428) locked _at_ /usr/src/sys/dev/usb/usb_request.c:322
   panic: from debugger
   cpuid = 2
   KDB: stack backtrace:
   Physical memory: 2005 MB
   Dumping 267 MB: 252 236 220 204 188 172 156 140 124 108 92 76 60 44 28 12
   
   Reading symbols from /boot/kernel/coretemp.ko...Reading symbols from /boot/kernel/coretemp.ko.symbols...done.
   done.
   Loaded symbols for /boot/kernel/coretemp.ko
   Reading symbols from /boot/modules/nvidia.ko...done.
   Loaded symbols for /boot/modules/nvidia.ko
   Reading symbols from /boot/kernel/linux.ko...Reading symbols from /boot/kernel/linux.ko.symbols...done.
   done.
   Loaded symbols for /boot/kernel/linux.ko
   Reading symbols from /boot/modules/vboxdrv.ko...done.
   Loaded symbols for /boot/modules/vboxdrv.ko
   Reading symbols from /boot/kernel/linprocfs.ko...Reading symbols from /boot/kernel/linprocfs.ko.symbols...done.
   done.
   Loaded symbols for /boot/kernel/linprocfs.ko
   Reading symbols from /boot/kernel/nullfs.ko...Reading symbols from /boot/kernel/nullfs.ko.symbols...done.
   done.
   Loaded symbols for /boot/kernel/nullfs.ko
   Reading symbols from /boot/modules/vboxnetflt.ko...done.
   Loaded symbols for /boot/modules/vboxnetflt.ko
   Reading symbols from /boot/kernel/netgraph.ko...Reading symbols from /boot/kernel/netgraph.ko.symbols...done.
   done.
   Loaded symbols for /boot/kernel/netgraph.ko
   Reading symbols from /boot/kernel/ng_ether.ko...Reading symbols from /boot/kernel/ng_ether.ko.symbols...done.
   done.
   Loaded symbols for /boot/kernel/ng_ether.ko
   Reading symbols from /boot/modules/vboxnetadp.ko...done.
   Loaded symbols for /boot/modules/vboxnetadp.ko
   Reading symbols from /usr/local/modules/fuse.ko...done.
   Loaded symbols for /usr/local/modules/fuse.ko
   #0  doadump () at pcpu.h:246
   246	pcpu.h: No such file or directory.
   	in pcpu.h
   (kgdb) 
   (kgdb) bt
   #0  doadump () at pcpu.h:246
   #1  0xc04d07a9 in db_fncall (dummy1=1596, dummy2=0, dummy3=-1060595728, dummy4=0xe8878840 "") at /usr/src/sys/ddb/db_command.c:548
   #2  0xc04d0ba1 in db_command (last_cmdp=0xc0dc09fc, cmd_table=0x0, dopager=1) at /usr/src/sys/ddb/db_command.c:445
   #3  0xc04d0cfa in db_command_loop () at /usr/src/sys/ddb/db_command.c:498
   #4  0xc04d2b9d in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_main.c:229
   #5  0xc08befe6 in kdb_trap (type=12, code=0, tf=0xe8878a2c) at /usr/src/sys/kern/subr_kdb.c:535
   #6  0xc0bc641f in trap_fatal (frame=0xe8878a2c, eva=3292909680) at /usr/src/sys/i386/i386/trap.c:927
   #7  0xc0bc6d0c in trap (frame=0xe8878a2c) at /usr/src/sys/i386/i386/trap.c:328
   #8  0xc0ba8beb in calltrap () at /usr/src/sys/i386/i386/exception.s:165
   #9  0xc0b04452 in vm_reserv_alloc_page (object=0xc207c000, pindex=28795) at /usr/src/sys/vm/vm_reserv.c:320
   #10 0xc0afd98e in vm_page_alloc (object=0xc207c000, pindex=28795, req=64) at /usr/src/sys/vm/vm_page.c:1081
   #11 0xc0aec0d5 in vm_fault (map=0xc686fae0, vaddr=819982336, fault_type=2 '\002', fault_flags=Variable "fault_flags" is not available.
   ) at /usr/src/sys/vm/vm_fault.c:399
   #12 0xc0bc657d in trap_pfault (frame=0xe8878d38, usermode=1, eva=819982340) at /usr/src/sys/i386/i386/trap.c:828
   #13 0xc0bc6e30 in trap (frame=0xe8878d38) at /usr/src/sys/i386/i386/trap.c:401
   #14 0xc0ba8beb in calltrap () at /usr/src/sys/i386/i386/exception.s:165
   #15 0x2834ec95 in ?? ()
   Previous frame inner to this frame (corrupt stack?)
   (kgdb) up 11
   #11 0xc0aec0d5 in vm_fault (map=0xc686fae0, vaddr=819982336, fault_type=2 '\002', fault_flags=Variable "fault_flags" is not available.
   ) at /usr/src/sys/vm/vm_fault.c:399
   399					fs.m = vm_page_alloc(fs.object, fs.pindex,
   (kgdb) 

I have kgdb(1) sitting at line #11 if you wish to instruct me to gather more output.

  -Alex

IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914.  If you have received this email in error, you are requested to contact the sender and delete the email.
Received on Thu Jan 07 2010 - 07:36:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC