Bug 1366052

Summary: Post 1311352 objdump -rdS is significantly slower
Product: Red Hat Enterprise Linux 7 Reporter: Brad Hubbard <bhubbard>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: low Docs Contact: Vladimír Slávik <vslavik>
Priority: low    
Version: 7.3CC: fweimer, law, mcermak, mprchlik, nickc, vslavik
Target Milestone: rc   
Target Release: 7.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
*objdump* mixed listing speed up Previously, the BFD library for parsing DWARF debug information and locating source code was very slow. The BFD library is used by the *objdump* tool. As a consequence, *objdump* became significantly slower when producing a mixed listing of source code and disassembly. Performance of the BFD library has been improved. As a result, producing a mixed listing with *objdump* is faster.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 20:24:09 UTC Type: Bug
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: 1390370    

Description Brad Hubbard 2016-08-10 22:03:28 UTC
Description of problem:

objdump -S with debuginfo available seems to have slowed down considerably since bz1311352. Note: The following results are from a low power VM but are representative of the issue.

Version-Release number of selected component (if applicable):
binutils-2.25.1-22.base.el7.x86_64

How reproducible:
100%

Additional info:

# /usr/bin/time objdump -rdS /usr/bin/ceph-osd >/tmp/obj.dump|head -3
objdump: Dwarf Error: Offset (3154315954) greater than or equal to .debug_str size (39740425).
43372.07user 37.13system 12:05:57elapsed 99%CPU (0avgtext+0avgdata 1707172maxresident)k
854864inputs+327328outputs (4203major+490006minor)pagefaults 0swaps

# yum -y erase `rpm -qa|grep debuginfo|paste -s`

# /usr/bin/time objdump -rdS /usr/bin/ceph-osd >/tmp/obj.dump|head -3
3.56user 0.12system 0:03.77elapsed 97%CPU (0avgtext+0avgdata 12300maxresident)k
20664inputs+200352outputs (0major+2392minor)pagefaults 0swaps

Comment 4 Nick Clifton 2016-11-10 15:22:51 UTC
FYI - this problem has been addressed by a patch submitted to the FSF binutils:

https://www.sourceware.org/ml/binutils/2016-11/msg00050.html

Once 7.4 is open for patching I will see about applying it there.

Comment 5 Nick Clifton 2017-01-16 15:28:01 UTC
Patch added.

Comment 7 Miloš Prchlík 2017-05-09 11:02:11 UTC
Verified using reproducer in the original report, with /usr/bin/ceph-osd binary. The difference in the time spent running between binutils-2.25.1-22.base.el7 and binutils-2.25.1-30.base.el7 is quite significant, -30.base.el7 finishes in cca 500 seconds.

Comment 10 errata-xmlrpc 2017-08-01 20:24:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1864