Bug 457187 - Unable to Open vmcore from Kdump
Summary: Unable to Open vmcore from Kdump
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 457189
TreeView+ depends on / blocked
 
Reported: 2008-07-30 07:03 UTC by Qian Cai
Modified: 2009-09-02 11:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 11:26:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
BFD fix for 32-vs-64bits of generic ELF formats. (1.14 KB, patch)
2008-07-30 07:09 UTC, Jan Kratochvil
no flags Details | Diff
BFD AC_SYS_LARGEFILE. (12.15 KB, patch)
2008-07-30 07:13 UTC, Jan Kratochvil
no flags Details | Diff
GDB AC_SYS_LARGEFILE. (12.33 KB, patch)
2008-07-30 07:13 UTC, Jan Kratochvil
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1361 0 normal SHIPPED_LIVE gdb bug fix update 2009-09-01 10:57:06 UTC

Description Qian Cai 2008-07-30 07:03:14 UTC
Description of problem:
Looks like GDB was unable to open ELF64 vmcore from Kdump in i686 architecture.
readelf and crash worked fine though.

# gdb /usr/lib/debug/lib/modules/2.6.18-92.el5/vmlinux
/var/crash/2008-07-30-01\:35/vmcore

GNU gdb Red Hat Linux (6.5-37.el5rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB 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.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

"/var/crash/2008-07-30-01:35/vmcore" is not a core dump: Value too large for
defined data type

# readelf -a /var/crash/2008-07-30-01\:35/vmcore
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              CORE (Core file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          64 (bytes into file)
  Start of section headers:          0 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         5
  Size of section headers:           0 (bytes)
  Number of section headers:         0
  Section header string table index: 0

# file /var/crash/2008-07-30-01\:35/vmcore
/var/crash/2008-07-30-01:35/vmcore: ELF 64-bit LSB core file Intel 80386,
version 1 (SYSV), SVR4-style

# crash /usr/lib/debug/lib/modules/2.6.18-92.el5/vmlinux
/var/crash/2008-07-30-01\:35/vmcore

      KERNEL: /usr/lib/debug/lib/modules/2.6.18-92.el5/vmlinux
    DUMPFILE: /var/crash/2008-07-30-01:35/vmcore
        CPUS: 2
        DATE: Wed Jul 30 01:35:01 2008
      UPTIME: 01:47:37
LOAD AVERAGE: 0.11, 0.03, 0.01
       TASKS: 104
    NODENAME: dell-pe700-01.rhts.bos.redhat.com
     RELEASE: 2.6.18-92.el5
     VERSION: #1 SMP Tue Apr 29 13:16:12 EDT 2008
     MACHINE: i686  (3391 Mhz)
      MEMORY: 3.7 GB
       PANIC: "kernel BUG at /mnt/tests/kernel/kdump/crash-lkdtm/lkdtm/lkdtm.c:260!"
         PID: 0
     COMMAND: "swapper"
        TASK: c06713c0  (1 of 2)  [THREAD_INFO: c06e7000]
         CPU: 0
       STATE: TASK_RUNNING (PANIC)


Version-Release number of selected component (if applicable):
gdb-6.5-37.el5
kernel-2.6.18-92.el5

How reproducible:
always

Additional info:
I have the machine (dell-pe700-01.rhts.bos.redhat.com) and vmcore reserved in
case you might want to have a look.

Comment 1 Jan Kratochvil 2008-07-30 07:09:54 UTC
Created attachment 312964 [details]
BFD fix for 32-vs-64bits of generic ELF formats.

Comment 2 Jan Kratochvil 2008-07-30 07:13:11 UTC
Created attachment 312965 [details]
BFD AC_SYS_LARGEFILE.

Comment 3 Jan Kratochvil 2008-07-30 07:13:44 UTC
Created attachment 312966 [details]
GDB AC_SYS_LARGEFILE.

Comment 4 Jan Kratochvil 2008-07-30 07:23:00 UTC
The BFD build also needs: --enable-64-bit-bfd
--enable-targets=x86_64-unknown-linux-gnu


Comment 5 RHEL Program Management 2008-07-30 07:30:18 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Jan Kratochvil 2008-08-29 11:20:54 UTC
The change was a bit more complicated and sorry it did not fit in RHEL-5.3.

Comment 8 Jan Kratochvil 2009-04-17 22:01:18 UTC
Built:
* Wed Apr 15 2009 Jan Kratochvil <jan.kratochvil> - 6.8-28
- Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187).
  - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.

Comment 10 Qian Cai 2009-07-10 10:24:33 UTC
Verified gdb-6.8-37.el5.i386 is now being able to read 64bit ELF VMCores,

# readelf -a vmcore
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              CORE (Core file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          64 (bytes into file)
  Start of section headers:          0 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         5
  Size of section headers:           0 (bytes)
  Number of section headers:         0
  Section header string table index: 0

# gdb /usr/lib/debug/lib/modules/2.6.18-156.el5/vmlinux vmcore
GNU gdb Fedora (6.8-37.el5)
Copyright (C) 2008 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 "i386-redhat-linux-gnu"...

warning: core file may not match specified executable file.
[New process 5172]
[New process 0]
gdb> list
#0  crash_kexec (regs=<value optimized out>) at kernel/kexec.c:1122
1122				crash_save_vmcoreinfo();
1117		locked = xchg(&kexec_lock, 1);
1118		if (!locked) {
1119			if (kexec_crash_image) {
1120				struct pt_regs fixed_regs;
1121				crash_setup_regs(&fixed_regs, regs);
1122				crash_save_vmcoreinfo();
1123				machine_crash_shutdown(&fixed_regs);
1124				machine_kexec(kexec_crash_image);
1125			}
1126			xchg(&kexec_lock, 0);

Comment 12 errata-xmlrpc 2009-09-02 11:26:23 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1361.html


Note You need to log in before you can comment on or make changes to this bug.