[pve-devel] How to compile pve-kernel with debug info?

Nathan L nathanlangford.4 at gmail.com
Sat Jun 5 04:18:15 CEST 2021


Hello,

I'm trying to open a kdump crash dump using the 'crash' tool but I think I
need a version of vmlinux with debug info included in order to do this. It
sounds like this isn't published so I believe I need to recompile the same
kernel version to get a version that includes the debug info.

I'm currently running kernel 5.4.114-1-pve so I've cloned the pve-kernel
git repo and checked out the
commit ee60bb7ce033f8d44e29ac1f1ec50dee836c6742 for "update ABI file for
5.4.114-1-pve" under the pve-kernel-5.4 branch. With this, I'm able to run
'make' and successfully recompile the kernel and produce
'pve-kernel-5.4.114-1-pve_5.4.114-1_amd64.deb'.

root at hostname:~/pve-kernel# file
build/debian/pve-kernel-5.4.114-1-pve/boot/vmlinuz-5.4.114-1-pve
build/debian/pve-kernel-5.4.114-1-pve/boot/vmlinuz-5.4.114-1-pve: Linux
kernel x86 boot executable bzImage, version 5.4.114-1-pve (root at hostname)
#1 SMP PVE 5.4.114-1 (Sun, 09 May 2021 17:13:05 +0200), RO-rootFS, swap_dev
0xB, Normal VGA


root at hostname:~/pve-kernel# uname -a
Linux hostname 5.4.114-1-pve #1 SMP PVE 5.4.114-1 (Sun, 09 May 2021
17:13:05 +0200) x86_64 GNU/Linux


My issue is, when I attempt to run crash using the compiled vmlinux file, I
receive the following:

root at hostname:~/pve-kernel# crash ~/pve-kernel/build/ubuntu-focal/vmlinux
/var/crash/202106021922/dump.202106021922

crash 7.2.5
Copyright (C) 2002-2019  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program 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.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.

GNU gdb (GDB) 7.6
Copyright (C) 2013 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-unknown-linux-gnu"...

WARNING: kernel relocated [840MB]: patching 114251 gdb minimal_symbol values

WARNING: kernel version inconsistency between vmlinux and dumpfile

crash: seek error: kernel virtual address: ffff905a5f606024  type:
"tss_struct ist array"

Lots of questions that probably all have the same answer:

   - What am I missing here?
   - Should I not use the compiled vmlinux file at
   ./build/ubuntu-focal/vmlinux?
   - Is there a flag I need to change or add somewhere to properly compile
   a version of the kernel I can use with crash?
   - Is there a difference between the vmlinux file in the
   build/ubuntu-focal directory vs what I could extract from the vmlinuz file
   in the build/debian directory? The latter had the debug info stripped when
   I extracted it.

Thanks in advance,

Nathan



More information about the pve-devel mailing list