From owner-freebsd-current@FreeBSD.ORG Sat Feb 16 18:28:50 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A04616A421 for ; Sat, 16 Feb 2008 18:28:50 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 914EA13C457 for ; Sat, 16 Feb 2008 18:28:49 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id EB0DD28441F; Sat, 16 Feb 2008 19:00:08 +0100 (CET) Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id m1GHwCrs034568; Sat, 16 Feb 2008 18:58:12 +0100 (CET) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id m1GHwCdm034567; Sat, 16 Feb 2008 18:58:12 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Sat, 16 Feb 2008 18:58:11 +0100 To: John Marino Message-ID: <20080216175811.GA33393@saturn.kn-bremen.de> References: <43555.82.234.78.29.1203154742.squirrel@secure.synsport.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43555.82.234.78.29.1203154742.squirrel@secure.synsport.net> User-Agent: Mutt/1.5.16 (2007-06-09) X-Mailman-Approved-At: Sat, 16 Feb 2008 20:04:40 +0000 Cc: freebsd-current@freebsd.org Subject: Re: 7.0 RC2 kernel panic with Kqemu/AMD64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Feb 2008 18:28:50 -0000 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@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 > Feb 16 03:02:48 draco kernel: Features2=0x2001 > Feb 16 03:02:48 draco kernel: AMD > Features=0xea500800 > Feb 16 03:02:48 draco kernel: AMD > Features2=0x11f > 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