Bug 672874

Summary: crash cannot use compressed kernels
Product: [Fedora] Fedora Reporter: Dave Allan <dallan>
Component: crashAssignee: Dave Anderson <anderson>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: anderson
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-26 17:13:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 672867    

Description Dave Allan 2011-01-26 16:09:44 UTC
Description of problem:
The kernel-debug package in Fedora 14 provides a compressed kernel, which crash doesn't recognize.  

rpm -q --filesbypkg kernel-debug | grep vmlinu
kernel-debug              /boot/vmlinuz-2.6.35.10-74.fc14.x86_64.debug

but crash reports:

crash: /boot/vmlinuz-2.6.35.10-74.fc14.x86_64.debug: not a supported file format

I was able to open the dump in question by rebuilding the kernel rpm which produced an uncompressed kernel binary, which is consistent with crash's manpage.

I'm not sure if this is an RFE for crash to be able to use the compressed kernel provided by F14, or a bug in the kernel-debug package for not providing the uncompressed kernel.  Either way, F14 should provide a debug kernel that works without having to rebuild the kernel src rpm.

Comment 1 Dave Anderson 2011-01-26 17:13:01 UTC
Man, you are falling out of touch...

Fedora builds two kernel flavors for x86_64, a "base" version
and a "debug" version:

  kernel-2.6.35.10-69.fc14.x86_64.rpm 
  kernel-debug-2.6.35.10-69.fc14.x86_64.rpm

Those packages contain the vmlinuz (with a z) files, which
are stripped-down compressed images that get loaded into 
memory, and which are completely useless to the crash utility.

The vmlinux (with an x) files needed by crash (or gdb), are found
in the associated debuginfo packages:

  kernel-debuginfo-2.6.35.10-69.fc14.x86_64.rpm
  kernel-debug-debuginfo-2.6.35.10-69.fc14.x86_64.rpm

And if you install either of the above, rpm requires that you also
install the "common" part for both kernel types:

  kernel-debuginfo-common-x86_64-2.6.35.10-69.fc14.x86_64.rpm
  
So depending upon which kernel version you're debugging, you
need to install the relevant -debuginfo package and the 
-debuginfo-common package.

If you're not debugging any kernel modules, you can use rpm2cpio
and just pull out the "vmlinux" file from the relevant -debuginfo
rpm filem, i.e, without having to install the two -debuginfo
packages.

Comment 2 Dave Allan 2011-01-26 18:45:12 UTC
Hey Dave, so sorry for the noise, and thanks for the guidance; it does of course work as you describe after I do debuginfo-install kernel