From owner-freebsd-hackers@freebsd.org Fri Jun 30 02:12:16 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66EA1DAA827 for ; Fri, 30 Jun 2017 02:12:16 +0000 (UTC) (envelope-from mwlucas@mail.michaelwlucas.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC837BFA6 for ; Fri, 30 Jun 2017 02:12:16 +0000 (UTC) (envelope-from mwlucas@mail.michaelwlucas.com) Received: by mailman.ysv.freebsd.org (Postfix) id 4DF5EDAA826; Fri, 30 Jun 2017 02:12:16 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D902DAA825 for ; Fri, 30 Jun 2017 02:12:16 +0000 (UTC) (envelope-from mwlucas@mail.michaelwlucas.com) Received: from mail.michaelwlucas.com (mail.michaelwlucas.com [104.236.197.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22FF47BFA5 for ; Fri, 30 Jun 2017 02:12:15 +0000 (UTC) (envelope-from mwlucas@mail.michaelwlucas.com) Received: from mail.michaelwlucas.com (localhost [127.0.0.1]) by mail.michaelwlucas.com (8.15.2/8.15.2) with ESMTP id v5U2C6fX043626 for ; Thu, 29 Jun 2017 22:12:06 -0400 (EDT) (envelope-from mwlucas@mail.michaelwlucas.com) Received: (from mwlucas@localhost) by mail.michaelwlucas.com (8.15.2/8.15.2/Submit) id v5U2C5x2043625 for hackers@freebsd.org; Thu, 29 Jun 2017 22:12:05 -0400 (EDT) (envelope-from mwlucas) Date: Thu, 29 Jun 2017 22:12:05 -0400 From: "Michael W. Lucas" To: hackers@freebsd.org Subject: extract panic message & debugging from vmcore.0 ? Message-ID: <20170630021205.GA43579@mail.michaelwlucas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.michaelwlucas.com X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mail.michaelwlucas.com [127.0.0.1]); Thu, 29 Jun 2017 22:12:08 -0400 (EDT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 02:12:16 -0000 Hi, Short question: how do I get debug information for a PR from a vmcore? Long question: we have conflicting docs. Which should I follow? Good news: I needed a panic for the new "Absolute FreeBSD" anyway, this one will do. Details: I got an actual kernel panic by running "gpart resize" on: FreeBSD storm 12.0-CURRENT FreeBSD 12.0-CURRENT #1 r318747: Tue May 23 16:27:01 EDT 2017 root@storm:/usr/obj/usr/src/sys/GENERIC amd64 I dumped it at the panic prompt, savecore ran at boot. According to the Handbook, the next step is to run "kgdb kernel.debug vmcore.0" to recover the panic message. But no kgdb is installed. After some searching, I installed devel/gdb. # kgdb kernel.debug /var/crash/vmcore.0 GNU gdb (GDB) 7.12.1 [GDB v7.12.1 for FreeBSD] Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from kernel.debug...done. ABI doesn't support a vmcore target Well, that's not good. I did more searching and found /usr/src/tools/debugscripts/README. # cd /usr/obj/usr/src/sys/GENERIC # make gdbinit # gdb kernel.debug GNU gdb (GDB) 7.12.1 [GDB v7.12.1 for FreeBSD] Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from kernel.debug...done. .gdbinit:16: Error in sourced command file: No symbol "remotebaud" in current context. How are we supposed to extract information from a vmcore these days? -- Michael W. Lucas Twitter @mwlauthor nonfiction: https://www.michaelwlucas.com/ fiction: https://www.michaelwarrenlucas.com/ blog: http://blather.michaelwlucas.com/