Kernel panic: Need help debugging
lr x
lrx337 at gmail.com
Sun Sep 2 18:22:12 UTC 2018
Hi!
I can get the kernel to panic when I try to run virtualbox (selecting the
amd64 ubuntu iso and attaching to virtual machine and starting it up.).
The kernel:
12.0-ALPHA3 FreeBSD 12.0-ALPHA3 #0 r338359: Wed Aug 29 21:49:53 EDT
2018 someone at somebox:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
Virtualbox was installed with pkg install virtualbox-ose
I have access to the crash dump, but running with kgdb does not reveal more
information. I found a reference to the panic string:
https://reviews.freebsd.org/D4197 . I could find that the panic string is
indeed printed in the malloc_dbg function in the /sys/kern/kern_malloc.c
file. How can I trace this further to understand why the kernel lands in
such a situation?
Thanks!
Here are the contents of the info.last file and kgdb invocation on the
crash dump.
# cat /var/crash/info.last
Dump header from device: /dev/ada0p4
Architecture: amd64
Architecture Version: 2
Dump Length: 937099264
Blocksize: 512
Compression: none
Dumptime: Sat Sep 1 22:50:57 2018
Hostname: somebox
Magic: FreeBSD Kernel Dump
Version String: FreeBSD 12.0-ALPHA3 #0 r338359: Wed Aug 29 21:49:53 EDT
2018
someone at somebox:/usr/obj/usr/src/amd64.amd64/sys/GENERIC
Panic String: malloc: called with spinlock or critical section held
Dump Parity: 274387030
Bounds: 3
Dump Status: good
root at somebox:/usr/src # kgdb -n 3
<..snip..>
Unread portion of the kernel message buffer:
Fatal trap 12: page fault while in kernel mode
cpuid = 4; apic id = 04
fault virtual address = 0x80a851ab8
fault code = supervisor read data, protection violation
instruction pointer = 0x20:0xffffffff8354b2e4
stack pointer = 0x28:0xfffffe008ced1200
frame pointer = 0x28:0xfffffe008ced1200
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 1792 (VirtualBox)
Uptime: 48m52s
(ada0:ahcich2:0:0:0): spin-down
Dumping 893 out of 16221
MB:..2%..11%..22%..31%..42%..51%..61%..72%..81%..92%
<Reading symbols snip>
#0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1383
1383 CPU_SET_ATOMIC(cpu, &stopped_cpus);
(kgdb) bt
#0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1383
#1 0xffffffff811d1484 in ipi_nmi_handler () at
/usr/src/sys/x86/x86/mp_x86.c:1341
#2 0xffffffff8105d889 in trap (frame=0xffffffff82057db0) at
/usr/src/sys/amd64/amd64/trap.c:206
#3 0xffffffff8103baad in nmi_calltrap () at
/usr/src/sys/amd64/amd64/exception.S:776
#4 0xffffffff811c1f76 in cpu_idle (busy=<value optimized out>) at
/usr/src/sys/x86/x86/cpu_machdep.c:489
Previous frame inner to this frame (corrupt stack?)
More information about the freebsd-current
mailing list