Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 178796

Summary: Large core dump created on 32-bit x86-64 not usable on x86
Product: Red Hat Enterprise Linux 4 Reporter: Bastien Nocera <bnocera>
Component: gdbAssignee: Alexandre Oliva <aoliva>
Status: CLOSED ERRATA QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: aoliva, cagney, kasal, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2006-0429 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-10 21:17:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 181409, 190547, 194343    
Attachments:
Description Flags
mmap_all.c
none
mmap_all.bz2
none
core.21435.bz2 none

Description Bastien Nocera 2006-01-24 14:25:42 UTC
gdb-6.3.0.0-1.96

1. Compile attached testcase in 32-bit mode on x86-64
gcc -g -m32 -o mmap_all mmap_all.c

2. Set the maximum core dump size
ulimit -c unlimited

3. Run the testcase and wait for the 2.7 gigs core dump to be created
./mmap_all

4. Get a backtrace from the core dump on the x86-64
$ gdb ./mmap_all core.21435
GNU gdb Red Hat Linux (6.3.0.0-1.63rh)
<snip>
#0  0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x00b407d5 in raise () from /lib/tls/libc.so.6
#2  0x00b42149 in abort () from /lib/tls/libc.so.6
#3  0x08048596 in main ()

5. Copy the core dump and the binary to an x86 machine
6. Try to gather a backtrace from the coredump
$ gdb ./mmap_all core.21435
GNU gdb Red Hat Linux (6.3.0.0-1.96rh)
Copyright 2004 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"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".


warning: exec file is newer than core file.
Reading symbols from shared object read from target memory...(no debugging
symbols found)...done.
Loaded system supplied DSO at 0xffffe000
Core was generated by `./mmap_all'.
Program terminated with signal 6, Aborted.
BFD: BFD 2.15.93 20041018 internal error, aborting at ../../gdb-6.3/bfd/cache.c
line 495 in bfd_cache_lookup_worker

BFD: Please report this bug.

Comment 1 Bastien Nocera 2006-01-24 14:25:43 UTC
Created attachment 123613 [details]
mmap_all.c

Comment 2 Bastien Nocera 2006-01-24 14:27:22 UTC
Created attachment 123614 [details]
mmap_all.bz2

mmap_all binary created on x86-64

Comment 3 Bastien Nocera 2006-01-24 14:28:30 UTC
Created attachment 123616 [details]
core.21435.bz2

core dump created by mmap_all and the kernel on x86-64
Watch out, 2.7 gigs unpacked

Comment 10 Bob Johnson 2006-04-11 16:51:46 UTC
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 4.4 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 4.4 release.

Comment 15 Red Hat Bugzilla 2006-08-10 21:17:50 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 the 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-2006-0429.html