Bug 729018

Summary: Failed to find the .debug_info section in a debuginfo file
Product: Red Hat Enterprise Linux 6 Reporter: Karel Klíč <kklic>
Component: crash-trace-commandAssignee: Dave Anderson <anderson>
Status: CLOSED ERRATA QA Contact: Kernel Dump QE <kernel-dump-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: phan, rvokal, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: crash-trace-command-1.0-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 12:58:26 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: 727919, 767187    
Attachments:
Description Flags
patch to build with RPM_OPT_FLAGS and address resultant compiler complaints none

Description Karel Klíč 2011-08-08 15:19:41 UTC
A problem related to debuginfo was found in the crash-trace-command-1.0-3.el6 package. This issue might affect crash analysis done by Automatic Bug Reporting Tool and its retrace server, and also prevent proper debugging of crashes via GDB.

When a binary is compiled without gcc's -g option, no debugging information is generated and rpmbuild creates almost-empty debuginfo file, which cannot be used for debugging. Please fix the package build process to use $RPM_OPT_FLAGS, which include the -g option among others.

path: /usr/lib/debug/usr/lib/crash/extensions/trace.so.debug
package: crash-trace-command-debuginfo-1.0-3.el6.i686

This issue can be investigated and tested by using eu-readelf tool from the elfutils package. Use `eu-readelf --section-headers /usr/lib/debug/usr/bin/<debuginfofile>.debug` to see if debuginfo file contains .debug_info section. It is supposed to be there.

(This bug was detected and filed by a script.)

Comment 2 RHEL Program Management 2011-08-08 15:40:45 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Dave Anderson 2011-08-08 19:23:41 UTC
Created attachment 517288 [details]
patch to build with RPM_OPT_FLAGS and address resultant compiler complaints

Comment 6 Dave Anderson 2012-02-08 20:58:21 UTC
MODIFIED:

  Information for build crash-trace-command-1.0-4.el6
  https://brewweb.devel.redhat.com/buildinfo?buildID=198000

Sample compile line from x86_64 build log:

gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -I/usr/include/crash -nostartfiles -shared -rdynamic -o trace.so trace.c -fPIC -DX86_64 

eu-readelf of x86_64 trace.so.debug above:

# eu-readelf --section-headers trace.so.debug
There are 33 section headers, starting at offset 0x1ece0:

Section Headers:
[Nr] Name                 Type         Addr             Off      Size     ES Flags Lk Inf Al
[ 0]                      NULL         0000000000000000 00000000 00000000  0        0   0  0
[ 1] .note.gnu.build-id   NOTE         0000000000000190 00000190 00000024  0 A      0   0  4
[ 2] .gnu.hash            NOBITS       00000000000001b8 000001b8 00000040  0 A      3   0  8
[ 3] .dynsym              NOBITS       00000000000001f8 000001b8 000004c8 24 A      4   2  8
[ 4] .dynstr              NOBITS       00000000000006c0 000001b8 00000209  0 A      0   0  1
[ 5] .gnu.version         NOBITS       00000000000008ca 000001b8 00000066  2 A      3   0  2
[ 6] .gnu.version_r       NOBITS       0000000000000930 000001b8 00000060  0 A      4   1  8
[ 7] .rela.dyn            NOBITS       0000000000000990 000001b8 000003c0 24 A      3   0  8
[ 8] .rela.plt            NOBITS       0000000000000d50 000001b8 00000348 24 A      3   9  8
[ 9] .plt                 NOBITS       0000000000001098 000001b8 00000240 16 AX     0   0  4
[10] .text                NOBITS       00000000000012e0 000001c0 00007114  0 AX     0   0 16
[11] .rodata              NOBITS       00000000000083f8 000001c0 00001110  1 AMS    0   0  8
[12] .eh_frame_hdr        NOBITS       0000000000009508 000001c0 000001f4  0 A      0   0  4
[13] .eh_frame            NOBITS       0000000000009700 000001c0 00000a68  0 A      0   0  8
[14] .dynamic             NOBITS       000000000020a168 000001c0 00000180 16 WA     4   0  8
[15] .got                 NOBITS       000000000020a2e8 000001c0 00000040  8 WA     0   0  8
[16] .got.plt             NOBITS       000000000020a328 000001c0 00000130  8 WA     0   0  8
[17] .data                NOBITS       000000000020a460 000001c0 00000130  0 WA     0   0 32
[18] .bss                 NOBITS       000000000020a5a0 000001c0 00001da0  0 WA     0   0 32
[19] .comment             PROGBITS     0000000000000000 000001c0 0000002c  1 MS     0   0  1
[20] .debug_aranges       PROGBITS     0000000000000000 000001ec 00000030  0        0   0  1
[21] .debug_pubnames      PROGBITS     0000000000000000 0000021c 00000048  0        0   0  1
[22] .debug_info          PROGBITS     0000000000000000 00000264 00007af5  0        0   0  1
[23] .debug_abbrev        PROGBITS     0000000000000000 00007d59 000004cd  0        0   0  1
[24] .debug_line          PROGBITS     0000000000000000 00008226 00001643  0        0   0  1
[25] .debug_str           PROGBITS     0000000000000000 00009869 000023a6  1 MS     0   0  1
[26] .debug_loc           PROGBITS     0000000000000000 0000bc0f 00008cb5  0        0   0  1
[27] .debug_pubtypes      PROGBITS     0000000000000000 000148c4 0000042b  0        0   0  1
[28] .debug_ranges        PROGBITS     0000000000000000 00014cef 00003a00  0        0   0  1
[29] .gdb_index           PROGBITS     0000000000000000 000186ef 00002fa0  0        0   0  1
[30] .shstrtab            STRTAB       0000000000000000 0001b68f 0000014d  0        0   0  1
[31] .symtab              SYMTAB       0000000000000000 0001b7e0 00001c68 24       32 254  8
[32] .strtab              STRTAB       0000000000000000 0001d448 00001893  0        0   0  1

#

Comment 17 errata-xmlrpc 2012-06-20 12:58:26 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.

http://rhn.redhat.com/errata/RHBA-2012-0808.html