Bug 175075 - Can't debug one machine's core files on another
Can't debug one machine's core files on another
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gdb (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Alexandre Oliva
Jay Turner
:
: 181463 (view as bug list)
Depends On:
Blocks: 133944 181409 190545
  Show dependency treegraph
 
Reported: 2005-12-06 06:39 EST by Bastien Nocera
Modified: 2015-01-07 19:11 EST (History)
6 users (show)

See Also:
Fixed In Version: RHBA-2006-0429
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-10 17:17:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
crash.c (264 bytes, text/plain)
2005-12-06 06:39 EST, Bastien Nocera
no flags Details
Patch that enables gdb to compensate for prelink differences (7.89 KB, patch)
2006-01-15 16:09 EST, Alexandre Oliva
no flags Details | Diff
Backport of the patch just posted for upstream review (15.84 KB, patch)
2006-02-08 00:49 EST, Alexandre Oliva
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0429 normal SHIPPED_LIVE gdb bug fix update 2006-08-09 00:00:00 EDT

  None (edit)
Description Bastien Nocera 2005-12-06 06:39:38 EST
gdb-6.3.0.0-1.63

1. Compile the attached test program:
gcc -O0 -o crash -g crash.c
2. Enable core dumps
ulimit -c unlimited
3. Run the program, and generate the core
4. Launch gdb on the core:
(gdb) bt
#0  0x0045bc60 in rawmemchr () from /lib/tls/libc.so.6
#1  0x00450fd5 in _IO_str_init_static_internal () from /lib/tls/libc.so.6
#2  0x0044606d in vsscanf () from /lib/tls/libc.so.6
#3  0x0044131b in sscanf () from /lib/tls/libc.so.6
#4  0x080483d7 in Recurse (i=0) at crash.c:10
#5  0x080483e7 in Recurse (i=1) at crash.c:12
#6  0x080483e7 in Recurse (i=2) at crash.c:12
#7  0x080483e7 in Recurse (i=3) at crash.c:12
#8  0x080483e7 in Recurse (i=4) at crash.c:12
#9  0x080483e7 in Recurse (i=5) at crash.c:12
#10 0x080483e7 in Recurse (i=6) at crash.c:12
#11 0x080483e7 in Recurse (i=7) at crash.c:12
#12 0x080483e7 in Recurse (i=8) at crash.c:12
#13 0x080483e7 in Recurse (i=9) at crash.c:12
#14 0x080483e7 in Recurse (i=10) at crash.c:12
#15 0x08048430 in main () at crash.c:22

5. Copy all the files (binary and core included) on another machine with the
same glibc, gdb, and gcc installed (another RHEL4).
6. Run gdb on the other machine:
(gdb) bt
#0  0x0045bc60 in ?? ()
#1  0x00000000 in ?? ()

I compared the dependencies with "readelf -Wl", no difference apart from the
entry point and the relocatable data.
Comment 1 Bastien Nocera 2005-12-06 06:39:39 EST
Created attachment 121901 [details]
crash.c
Comment 16 Andrew Cagney 2006-02-06 17:47:20 EST
Alex Olivia's determined that there is a subtle but critical difference between
the two systems - prelink has altered the libraries slightly making the
relocation information different.

Ways to handle this robustly and consistently are still being considered.


Comment 17 Alexandre Oliva 2006-02-08 00:49:42 EST
Created attachment 124352 [details]
Backport of the patch just posted for upstream review

I've improved the prelink-change detection, by taking alignment of the pages
from the binary into account.  If the dynamic section moved within its page,
assume the binary changed, otherwise adjust the offset.
Comment 18 Alexandre Oliva 2006-02-14 13:28:46 EST
*** Bug 181463 has been marked as a duplicate of this bug. ***
Comment 21 Alexandre Oliva 2006-02-23 15:51:07 EST
6.3.0.0-1.107..110 will have the fix when they finish building.
Comment 32 Bob Johnson 2006-04-11 11:51:07 EDT
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 37 Red Hat Bugzilla 2006-08-10 17:17:11 EDT
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

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