# kernel panic



## nORKy (Jan 28, 2013)

Hi,

How can I diagnose a kernel panic?

I can do nothing with this:

```
Jan 28 11:31:40 smtp11 kernel: Fatal trap 12: page fault while in kernel mode
Jan 28 11:31:40 smtp11 kernel: cpuid = 1; apic id = 01
Jan 28 11:31:40 smtp11 kernel: fault virtual address	= 0x308
Jan 28 11:31:40 smtp11 kernel: fault code		= supervisor read data, page not present
Jan 28 11:31:40 smtp11 kernel: instruction pointer	= 0x20:0xffffffff805fb5de
Jan 28 11:31:40 smtp11 kernel: stack pointer	        = 0x28:0xffffff800008e9d0
Jan 28 11:31:40 smtp11 kernel: frame pointer	        = 0x28:0xffffff800008e9f0
Jan 28 11:31:40 smtp11 kernel: code segment		= base 0x0, limit 0xfffff, type 0x1b
Jan 28 11:31:40 smtp11 kernel: = DPL 0, pres 1, long 1, def32 0, gran 1
Jan 28 11:31:40 smtp11 kernel: processor eflags	= interrupt enabled, resume, IOPL = 0
Jan 28 11:31:40 smtp11 kernel: current process		= 12 (swi6: task queue)
Jan 28 11:31:40 smtp11 kernel: trap number		= 12
Jan 28 11:31:40 smtp11 kernel: panic: page fault
Jan 28 11:31:40 smtp11 kernel: cpuid = 1
Jan 28 11:31:40 smtp11 kernel: KDB: stack backtrace:
Jan 28 11:31:40 smtp11 kernel: #0 0xffffffff8063dcbe at kdb_backtrace+0x5e
Jan 28 11:31:40 smtp11 kernel: #1 0xffffffff8060aed7 at panic+0x187
Jan 28 11:31:40 smtp11 kernel: #2 0xffffffff80900b10 at trap_fatal+0x290
Jan 28 11:31:40 smtp11 kernel: #3 0xffffffff80900e61 at trap_pfault+0x201
Jan 28 11:31:40 smtp11 kernel: #4 0xffffffff8090131f at trap+0x3df
Jan 28 11:31:40 smtp11 kernel: #5 0xffffffff808e87f4 at calltrap+0x8
Jan 28 11:31:40 smtp11 kernel: #6 0xffffffff805c6122 at _cv_timedwait+0x1b2
Jan 28 11:31:40 smtp11 kernel: #7 0xffffffff80609fe5 at _sema_timedwait+0x55
Jan 28 11:31:40 smtp11 kernel: #8 0xffffffff80285d7c at ata_queue_request+0x51c
Jan 28 11:31:40 smtp11 kernel: #9 0xffffffff80649565 at taskqueue_run_locked+0x85
Jan 28 11:31:40 smtp11 kernel: #10 0xffffffff80649848 at taskqueue_run+0x38
Jan 28 11:31:40 smtp11 kernel: #11 0xffffffff805e2914 at intr_event_execute_handlers+0x104
Jan 28 11:31:40 smtp11 kernel: #12 0xffffffff805e3fa5 at ithread_loop+0x95
Jan 28 11:31:40 smtp11 kernel: #13 0xffffffff805dfb2f at fork_exit+0x11f
Jan 28 11:31:40 smtp11 kernel: #14 0xffffffff808e8d3e at fork_trampoline+0xe
```


----------



## fonz (Jan 28, 2013)

Does this help? Gist of it is that you need to match the instruction pointer with a specific function in the kernel.


----------



## nORKy (Jan 29, 2013)

I set dumpdev in rc.conf to get a crash dump
I need to wait now


----------

