From owner-freebsd-questions@FreeBSD.ORG Wed Dec 31 15:42:06 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09E60106564A for ; Wed, 31 Dec 2008 15:42:06 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.17]) by mx1.freebsd.org (Postfix) with ESMTP id 91FCF8FC1B for ; Wed, 31 Dec 2008 15:42:05 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) Received: from [84.92.153.232] (helo=curlew.milibyte.co.uk) by pih-relay04.plus.net with esmtp (Exim) id 1LI3Ct-0003ZD-7Q for freebsd-questions@freebsd.org; Wed, 31 Dec 2008 15:42:03 +0000 Received: by curlew.milibyte.co.uk with local (Exim 4.69) (envelope-from ) id 1LI3Cs-0000Ov-Jo for freebsd-questions@freebsd.org; Wed, 31 Dec 2008 15:42:03 +0000 From: Mike Clarke To: freebsd-questions@freebsd.org Date: Wed, 31 Dec 2008 15:42:02 +0000 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812311542.02436.jmc-freebsd2@milibyte.co.uk> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: jmc-freebsd2@milibyte.co.uk X-SA-Exim-Scanned: No (on curlew.milibyte.co.uk); SAEximRunCond expanded to false X-Plusnet-Relay: 5a7da3e092cad0a609be23f7b98ccfbd Subject: kgdb - problem obtaining a backtrace X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 15:42:06 -0000 Every time I plug my camera into the USB port on my 7.1-RC2 system I get a kernel panic. The camera causes no problem with 6.4-RELEASE on the same PC. I have submitted a PR for this problem (http://www.freebsd.org/cgi/query-pr.cgi?pr=130076) and attached kgdb output with a backtrace. Unfortunately the backtrace was of no use as the fault occurs in a loaded module and I was asked to use asf(8) output to load the modules into kgdb and create a more useful backtrace. Unfortunately when I did this I still got the same backtrace shown below. This is the first time I've needed to submit a PR and do things with crash dumps so I'm very much out of my depth in uncharted waters but willing to learn. Have I done something wrong with kgdb or is there some other problem with the dump file? ----------------------------------------------- curlew# kgdb /boot/kernel/kernel /var/crash/vmcore.0 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: 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:0x0 stack pointer = 0x28:0xe55ed698 frame pointer = 0x28:0xe55ed6d8 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 = 14 (swi4: clock sio) trap number = 12 panic: page fault cpuid = 0 Uptime: 2m50s Physical memory: 1971 MB Dumping 70 MB: 55 39 23 7 Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/kernel/acpi.ko.symbols...done. done. Loaded symbols for /boot/kernel/acpi.ko Reading symbols from /boot/kernel/linux.ko...Reading symbols from /boot/kernel/linux.ko.symbols...done. done. Loaded symbols for /boot/kernel/linux.ko #0 doadump () at pcpu.h:196 196 pcpu.h: No such file or directory. in pcpu.h (kgdb) source /root/.asf add symbol table from file "/boot/kernel/acpi.ko.symbols" at .text_addr = 0xc0db4350 .data_addr = 0xc0df5000 .bss_addr = 0xc0df73a0 add symbol table from file "/boot/kernel/linux.ko.symbols" at .text_addr = 0xc55a9080 .data_addr = 0xc55bf080 .bss_addr = 0xc55c16e0 (kgdb) backtrace #0 doadump () at pcpu.h:196 #1 0xc0795627 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc07958f9 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc0aa7b0c in trap_fatal (frame=0xe55ed658, eva=0) at /usr/src/sys/i386/i386/trap.c:939 #4 0xc0aa7d90 in trap_pfault (frame=0xe55ed658, usermode=0, eva=0) at /usr/src/sys/i386/i386/trap.c:852 #5 0xc0aa874c in trap (frame=0xe55ed658) at /usr/src/sys/i386/i386/trap.c:530 #6 0xc0a8e5bb in calltrap () at /usr/src/sys/i386/i386/exception.s:159 #7 0x00000000 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) q ----------------------------------------------- I don't know if I did things the right way but here's the procedure I followed to get the backtrace: The output of kldstat was: Id Refs Address Size Name 1 7 0xc0400000 9a1f68 kernel 2 1 0xc0da2000 6a2c4 acpi.ko 3 1 0xc5599000 22000 linux.ko ... and I ran the following command: asf -N /boot/kernel/kernel -M /var/crash/vmcore.0 -s /boot/kernel ... which produced the following .asf file: add-symbol-file /boot/kernel/acpi.ko.symbols 0xc0db4350 -s .data 0xc0df5000 -s .bss 0xc0df73a0 add-symbol-file /boot/kernel/linux.ko.symbols 0xc55a9080 -s .data 0xc55bf080 -s .bss 0xc55c16e0 ... which I specified in a source command in kgdb -- Mike Clarke