Bug 688532

Summary: eu-addr2line sometimes does not work
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: elfutilsAssignee: Roland McGrath <roland>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: fche, mcepl, mcepl, mjw, pmachata, roland
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-03-18 11:11:21 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:
Attachments:
Description Flags
The files from: xorg-x11-server-Xorg-1.10.0-3.fc15.x86_64 + xorg-x11-server-debuginfo-1.10.0-3.fc15.x86_64
none
xz of /tmp/x (=after eu-unstrip) none

Description Jan Kratochvil 2011-03-17 10:21:37 UTC
Created attachment 485978 [details]
The files from: xorg-x11-server-Xorg-1.10.0-3.fc15.x86_64 + xorg-x11-server-debuginfo-1.10.0-3.fc15.x86_64

Description of problem:
addr2line or gdb works in such case.

Version-Release number of selected component (if applicable):
elfutils-0.152-1.fc15.x86_64
binutils-2.21.51.0.6-1.fc15.x86_64
gdb-7.2.50.20110305-28.fc15.x86_64
xorg-x11-server-Xorg-1.10.0-3.fc15.x86_64
xorg-x11-server-debuginfo-1.10.0-3.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
$ eu-addr2line -e /usr/bin/Xorg 0x4a105f

Actual results:
??:0

Expected results:
/usr/src/debug/xorg-server-1.10.0/os/backtrace.c:46

Additional info:
$ gdb -q /usr/bin/Xorg -ex 'info line *0x4a105f' -ex q
Line 46 of "backtrace.c" starts at address 0x4a105f <xorg_backtrace+47> and ends at 0x4a1067 <xorg_backtrace+55>.
$ eu-addr2line -e /usr/bin/Xorg 0x4a105f
??:0
$ addr2line -e /usr/bin/Xorg 0x4a105f
??:0
$ eu-addr2line -e /usr/lib/debug/usr/bin/Xorg.debug 0x4a105f
??:0
$ addr2line -e /usr/lib/debug/usr/bin/Xorg.debug 0x4a105f
/usr/src/debug/xorg-server-1.10.0/os/backtrace.c:46
$ prelink -u -o /tmp/y /usr/bin/Xorg
$ eu-unstrip -o /tmp/x /tmp/y /usr/lib/debug/usr/bin/Xorg.debug 
$ eu-addr2line -e /tmp/x 0x4a105f
??:0
$ addr2line -e /tmp/x 0x4a105f
/usr/src/debug/xorg-server-1.10.0/os/backtrace.c:46

Comment 1 Roland McGrath 2011-03-17 17:28:38 UTC
Since that eu-unstrip output file apparently reproduces the problem, it would be easiest if you could just attach that one binary to this bug.

Comment 2 Jan Kratochvil 2011-03-17 17:36:09 UTC
Created attachment 486076 [details]
xz of /tmp/x (=after eu-unstrip)

Comment 3 Roland McGrath 2011-03-17 23:16:37 UTC
This file has no .debug_aranges section.  libdw relies on that section.
Did the compiler fail to emit one?  Or did something else remove it?

Comment 4 Jan Kratochvil 2011-03-18 11:11:21 UTC
Tracked now upstream as a gcc-4.6 regression, thanks for the analysis.