Re: 7.0 RC2 kernel panic with Kqemu/AMD64

From: Juergen Lock <nox_at_jelal.kn-bremen.de>
Date: Sat, 16 Feb 2008 18:58:11 +0100
On Sat, Feb 16, 2008 at 03:39:02AM -0600, John Marino wrote:
> I am using FreeBSD 7.0 RC2 and have installed Qemu with KQemu kernel
> accelerator via ports.  I experience repeatable kernel panics (log below)
> after a few minutes of use.  Before that, everything seemed to be working
> ok.  Is this a problem with the kernel?
> 
> Regards,
> John
> 
> Feb 16 03:02:48 draco syslogd: kernel boot file is /boot/kernel/kernel
> Feb 16 03:02:48 draco kernel:
> Feb 16 03:02:48 draco last message repeated 3 times
> Feb 16 03:02:48 draco kernel: Fatal trap a
> Feb 16 03:02:48 draco kernel: kernel trap 12 with interrupts disabled
> Feb 16 03:02:48 draco kernel:
> Feb 16 03:02:48 draco kernel:
> Feb 16 03:02:48 draco kernel: Fatal trap 12: page fault while in kernel mode
> Feb 16 03:02:48 draco kernel: cpuid = 0; apic id = 00
> Feb 16 03:02:48 draco kernel: fault virtual address     = 0x782
> Feb 16 03:02:48 draco kernel: fault code                = supervisor write
> data, page not present
> Feb 16 03:02:48 draco kernel: instruction pointer       = 0x9f80:0x297
> Feb 16 03:02:48 draco kernel: stack pointer             =
> 0x10:0xffffffffab9d9f80
> Feb 16 03:02:48 draco kernel: frame pointer             = 0x10:0xffffffff
> Feb 16 03:02:48 draco kernel: code segment              = base 0x0, limit
> 0xfffff, type 0x1b
> Feb 16 03:02:48 draco kernel: = DPL 0, pres 1, long 1, def32 0, gran 1
> Feb 16 03:02:48 draco kernel: processor eflags  = IOPL = 0
> Feb 16 03:02:48 draco kernel: current process           = 2242
> (qemu-system-x86_64)
> Feb 16 03:02:48 draco kernel: trap number               = 12
> Feb 16 03:02:48 draco kernel: panic: page fault
> Feb 16 03:02:48 draco kernel: cpuid = 0
> Feb 16 03:02:48 draco kernel: Uptime: 10h32m8s
> Feb 16 03:02:48 draco kernel: Copyright (c) 1992-2008 The FreeBSD Project.
> Feb 16 03:02:48 draco kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988,
> 1989, 1991, 1992, 1993, 1994
> Feb 16 03:02:48 draco kernel: The Regents of the University of California.
> All rights reserved.
> Feb 16 03:02:48 draco kernel: FreeBSD is a registered trademark of The
> FreeBSD Foundation.
> Feb 16 03:02:48 draco kernel: FreeBSD 7.0-RC2-p1 #0: Tue Feb 12 21:29:24
> UTC 2008
> Feb 16 03:02:48 draco kernel:
> root_at_amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
> Feb 16 03:02:48 draco kernel: Timecounter "i8254" frequency 1193182 Hz
> quality 0
> Feb 16 03:02:48 draco kernel: CPU: AMD Athlon(tm) 64 X2 Dual Core
> Processor 5000+ (2600.27-MHz K8-class CPU)
> Feb 16 03:02:48 draco kernel: Origin = "AuthenticAMD"  Id = 0x60fb2 
> Stepping = 2
> Feb 16 03:02:48 draco kernel:
> Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
> Feb 16 03:02:48 draco kernel: Features2=0x2001<SSE3,CX16>
> Feb 16 03:02:48 draco kernel: AMD
> Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
> Feb 16 03:02:48 draco kernel: AMD
> Features2=0x11f<LAHF,CMP,SVM,ExtAPIC,CR8,Prefetch>
> Feb 16 03:02:48 draco kernel: Cores per package: 2
> Feb 16 03:02:48 draco kernel: usable memory = 2067275776 (1971 MB)
> Feb 16 03:02:48 draco kernel: avail memory  = 1994817536 (1902 MB)
> Feb 16 03:02:48 draco kernel: ACPI APIC Table: <082307 APIC1639>
> Feb 16 03:02:48 draco kernel: FreeBSD/SMP: Multiprocessor System Detected:
> 2 CPUs
> Feb 16 03:02:48 draco kernel: cpu0 (BSP): APIC ID:  0
> Feb 16 03:02:48 draco kernel: cpu1 (AP): APIC ID:  1

Looks like you are running amd64 SMP, it is a known problem that kqemu
doesn't really work in that case (see pkg-message of the qemu port);
the exact cause of this is still unknown - the backtraces I got are rather
weird and not really helpful, see this thread:
	http://lists.freebsd.org/pipermail/freebsd-emulation/2007-November/004182.html
and there also is:
	http://www.freebsd.org/cgi/query-pr.cgi?pr=113430
If you or anyone else wants to help debug this you are very welcome of
course (it was suggested this might be a cache coherency issue, so maybe
your backtraces will look different since you're on an AMD CPU - mine is
Intel), otherwise your best bet probably is to use an UP kernel, or an
i386 install, interestingly there kqemu works also with SMP.  (well or
disable kqemu of course.)

 Oh, another reason for my weird backtraces might be the minidump race,
and if I read the commitlogs right it is not actually fixed (I obtained
my dumps before it was discovered), the patches only made sure not to
write over the end of swap.  So maybe I should try again with minidumps
disabled (if thats possible), one of these days...

 Sorry,
	Juergen
Received on Sat Feb 16 2008 - 17:28:50 UTC

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