public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Nathan L <nathanlangford.4@gmail.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] How to compile pve-kernel with debug info?
Date: Fri, 4 Jun 2021 20:18:15 -0600	[thread overview]
Message-ID: <CABrt_dO8jKOFiM+Jz_Gtv8yZhi8C-8LsDsYJ1kXPaJtDnu=cug@mail.gmail.com> (raw)

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@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@hostname)
#1 SMP PVE 5.4.114-1 (Sun, 09 May 2021 17:13:05 +0200), RO-rootFS, swap_dev
0xB, Normal VGA


root@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@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


             reply	other threads:[~2021-06-05  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-05  2:18 Nathan L [this message]
2021-06-08 20:42 ` Nathan L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABrt_dO8jKOFiM+Jz_Gtv8yZhi8C-8LsDsYJ1kXPaJtDnu=cug@mail.gmail.com' \
    --to=nathanlangford.4@gmail.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal