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.
Created attachment 312964 [details] BFD fix for 32-vs-64bits of generic ELF formats.
Created attachment 312965 [details] BFD AC_SYS_LARGEFILE.
Created attachment 312966 [details] GDB AC_SYS_LARGEFILE.
The BFD build also needs: --enable-64-bit-bfd --enable-targets=x86_64-unknown-linux-gnu
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.
The change was a bit more complicated and sorry it did not fit in RHEL-5.3.
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.
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);
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