From owner-freebsd-current@FreeBSD.ORG Mon Jul 4 17:28:46 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D504216A41C; Mon, 4 Jul 2005 17:28:46 +0000 (GMT) (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 C60C243D48; Mon, 4 Jul 2005 17:28:43 +0000 (GMT) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3) with ESMTP id j64HSfGj002911; Mon, 4 Jul 2005 19:28:41 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id j64HSfj1002909; Mon, 4 Jul 2005 19:28:41 +0200 Received: (from nox@localhost) by saturn.kn-bremen.de (8.11.4/8.8.5) id j64HTE663015; Mon, 4 Jul 2005 19:29:14 +0200 (CEST) From: Juergen Lock Date: Mon, 4 Jul 2005 19:29:12 +0200 To: Norikatsu Shigemura Message-ID: <20050704192912.A62999@saturn.kn-bremen.de> References: <200505141531.j4EFVXwA028227@sakura.ninth-nine.com> <200505141549.j4EFn2O8028645@sakura.ninth-nine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <200505141549.j4EFn2O8028645@sakura.ninth-nine.com> X-Mailman-Approved-At: Tue, 05 Jul 2005 12:42:00 +0000 Cc: alc@FreeBSD.org, jeff@FreeBSD.org, freebsd-current@FreeBSD.org, jhb@FreeBSD.org Subject: Re: latest current and kqemu cause a VM panic 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: Mon, 04 Jul 2005 17:28:47 -0000 On Sun, May 15, 2005 at 12:49:02AM +0900, Norikatsu Shigemura wrote: > Oops, I forgot Cc: qemu's port maintainer and a author of > KQEMU on FreeBSD. > > On Sun, 15 May 2005 00:31:33 +0900 (JST) > Norikatsu Shigemura wrote: > > I contacted a VM panic on following environment. > > > > FreeBSD: current (2005/05/14) > > Application: ports/emulators/qemu with KQEMU(WITH_KQEMU > > option). > > To do something: > > I'm compiling FreeBSD 5.4-RELEASE-p1 (make buildworld) as > > guest on qemu, and, after a while, current causes a panic. > > > > P.S. > > I have never contacted a panic like following without qemu. > > > > > > FreeBSD 6.0-CURRENT #5: Sat May 14 20:47:35 JST 2005 > > nork@nadesico.ninth-nine.com:/usr/obj/usr/src/sys/NADESICO > > ACPI APIC Table: > > Timecounter "i8254" frequency 1193182 Hz quality 0 > > CPU: Intel(R) Pentium(R) III CPU family 1133MHz (1129.08-MHz 686-class CPU) > > Origin = "GenuineIntel" Id = 0x6b1 Stepping = 1 > > Features=0x383fbff > > real memory = 1610547200 (1535 MB) > > avail memory = 1568923648 (1496 MB) > > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > > cpu0 (BSP): APIC ID: 0 > > cpu1 (AP): APIC ID: 1 > > ioapic0 irqs 0-23 on motherboard > > QEMU Accelerator Module version 1.0.0, Copyright (c) 2005 Fabrice Bellard > > FreeBSD wrapper port, Copyright (c) 2005 Antony T Curtis > > This is a proprietary product. Read the LICENSE file for more information > > Redistribution of this module is prohibited without authorization > > kqemu: KQEMU installed, max_instances=4 max_locked_mem=131072kB. > > > > (snip) > > > > login: info: [drm] Loading R200 Microcode > > panic: vm_page_insert: page already inserted > > cpuid = 0 > > KDB: enter: panic > > [thread pid 32128 tid 100222 ] > > Stopped at kdb_enter+0x30: leave > > db> where > > Tracing pid 32128 tid 100222 td 0xc3c30000 > > kdb_enter(c0663e9f,0,c0672378,f8823b7c,f8823b80) at kdb_enter+0x30 > > panic(c0672378,f8823b94,c3c30000,c22cebe8,0) at panic+0x14e > > vm_page_insert(c22cebe8,c80e4840,2,0,c13de698) at vm_page_insert+0x2a > > vm_page_alloc(c80e4840,2,0,0,f8823c44) at vm_page_alloc+0x348 > > vm_fault(c3c23a8c,805b000,2,8,f8823cec) at vm_fault+0xa30 > > trap_pfault(f8823d38,1,805b188,bfbfe440,805b188) at trap_pfault+0x13b > > trap(c062003b,3b,3b,8062034,8062048) at trap+0x21a > > calltrap() at calltrap+0x5 > > --- trap 0xc, eip = 0x68c3e5ac, esp = 0xbfbfe400, ebp = 0xbfbfe428 --- > > db> show pcpu 0 > > cpuid = 0 > > curthread = 0xc3c30000: pid 32128 "gnome-netstatus-app" > > curpcb = 0xf8823d90 > > fpcurthread = none > > idlethread = 0xc2bf0780: pid 12 "idle: cpu0" > > APIC ID = 0 > > currentldt = 0x50 > > db> show pcpu 1 > > cpuid = 1 > > curthread = 0xc2bf0600: pid 11 "idle: cpu1" > > curpcb = 0xe433dd90 > > fpcurthread = none > > idlethread = 0xc2bf0600: pid 11 "idle: cpu1" > > APIC ID = 1 > > currentldt = 0x50 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > Hi! I just now noticed its an smp box... Bakul Shah suggested the problem probably is that kqemu on -current needs giant, could you try the following patch? Index: files/kmod_bsd.c =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/kmod_bsd.c,v retrieving revision 1.1 diff -u -r1.1 kmod_bsd.c --- files/kmod_bsd.c 5 May 2005 12:41:10 -0000 1.1 +++ files/kmod_bsd.c 4 Jul 2005 15:43:34 -0000 @@ -322,6 +322,9 @@ .d_close = kqemu_close, .d_ioctl = kqemu_ioctl, .d_name = "kqemu", +#ifdef D_NEEDGIANT + .d_flags = D_NEEDGIANT, +#endif #endif }; thanx, Juergen