Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 2017 22:12:05 -0400
From:      "Michael W. Lucas" <mwlucas@michaelwlucas.com>
To:        hackers@freebsd.org
Subject:   extract panic message & debugging from vmcore.0 ?
Message-ID:  <20170630021205.GA43579@mail.michaelwlucas.com>

next in thread | raw e-mail | index | archive | help
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 <http://gnu.org/licenses/gpl.html>;
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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
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 <http://gnu.org/licenses/gpl.html>;
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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170630021205.GA43579>