Hi I am trying to compile and install a custom kernel. I am doing this inside the vmware player 5 on FreeBSD 9.0. Followed the exact same steps listed in this link http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html
Complication and install went well. However, when the custom kernel boots up, it pages faults on vfs_donmount.
After opening the core, the backtrace doesn't seem to be valid.
Anyone know how to solve this ? Am I missing something in the kernel configure ?
Thank you.
Complication and install went well. However, when the custom kernel boots up, it pages faults on vfs_donmount.
Code:
ada0: <VMware Virtual IDE Hard Drive 00000001> ATA-4 device
ada0: 33.300MB/s transfers (UDMA2, PIO 32768bytes)
ada0: 20480MB (41943040 512 byte sectors: 15H 63S/T 16383C)
ada0: Previously was known as ad0
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/ada0p2 [rw]...
VMware memory control driver initialized
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0x0
fault code = supervisor read, page not present
instruction pointer = 0x20:0xc0b4db5e
stack pointer = 0x28:0xee7f0980
frame pointer = 0x28:0xee7f0990
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 = 1392 (vmware-vmblockmount)
trap number = 12
panic: page fault
cpuid = 1
KDB: stack backtrace:
#0 0xc0af6e9f at kdb_backtrace+0x4f
#1 0xc0ac39df at panic+0x16f
#2 0xc0e29953 at trap_fatal+0x323
#3 0xc0e29a58 at trap_pfault+0xf8
#4 0xc0e2a9da at trap+0x46a
#5 0xc0e13fbc at calltrap+0x6
#6 0xc8d8c288 at os_panic+0x468
#7 0xc0b4facd at vfs_donmount+0xc1d
#8 0xc0b508af at sys_nmount+0x7f
#9 0xc0e2a0ca at syscall+0x34a
#10 0xc0e14021 at Xint0x80_syscall+0x21
Uptime: 11s
Physical memory: 2031 MB
Dumping 119 MB: 104 88 72 56 40 24 8
Dump complete
After opening the core, the backtrace doesn't seem to be valid.
Code:
[root@ /usr/obj/usr/src/sys/MYKERNEL]# kgdb kernel.debug /var/crash/vmcore.4
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:
stack pointer = 0x28:0xee7f0980
frame pointer = 0x28:0xee7f0990
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 = 1392 (vmware-vmblockmount)
trap number = 12
panic: page fault
cpuid = 1
KDB: stack backtrace:
#0 0xc0af6e9f at kdb_backtrace+0x4f
#1 0xc0ac39df at panic+0x16f
#2 0xc0e29953 at trap_fatal+0x323
#3 0xc0e29a58 at trap_pfault+0xf8
#4 0xc0e2a9da at trap+0x46a
#5 0xc0e13fbc at calltrap+0x6
#6 0xc8d8c288 at os_panic+0x468
#7 0xc0b4facd at vfs_donmount+0xc1d
#8 0xc0b508af at sys_nmount+0x7f
#9 0xc0e2a0ca at syscall+0x34a
#10 0xc0e14021 at Xint0x80_syscall+0x21
Uptime: 11s
Physical memory: 2031 MB
Dumping 119 MB: 104 88 72 56 40 24 8
Reading symbols from /boot/modules/vmxnet.ko...done.
Loaded symbols for /boot/modules/vmxnet.ko
Reading symbols from /boot/modules/vmxnet3.ko...done.
Loaded symbols for /boot/modules/vmxnet3.ko
Reading symbols from /boot/modules/vmmemctl.ko...done.
Loaded symbols for /boot/modules/vmmemctl.ko
Reading symbols from /boot/modules/vmblock.ko...done.
Loaded symbols for /boot/modules/vmblock.ko
#0 0xee7f0788 in ?? ()
(kgdb) bt
#0 0xee7f0788 in ?? ()
(kgdb) p vfs_donmount
$1 = {int (struct thread *, uint64_t, struct uio *)} 0xc0b4eeb0 <vfs_donmount>
(kgdb) p 0xc0b4eeb0+0xc1d
$2 = 3233086157
(kgdb) l *3233086157
0xc0b4facd is in vfs_donmount (/usr/src/sys/kern/vfs_mount.c:819).
814 /*
815 * Mount the filesystem.
816 * XXX The final recipients of VFS_MOUNT just overwrite the ndp they
817 * get. No freeing of cn_pnbuf.
818 */
819 error = VFS_MOUNT(mp);
820 if (error != 0) {
821 vfs_unbusy(mp);
822 vfs_mount_destroy(mp);
823 VI_LOCK(vp);
Anyone know how to solve this ? Am I missing something in the kernel configure ?
Thank you.