Bug 729042 - Debuginfo package issues in gcc
Summary: Debuginfo package issues in gcc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools
URL:
Whiteboard:
Depends On:
Blocks: 727919
TreeView+ depends on / blocked
 
Reported: 2011-08-08 15:20 UTC by Karel Klíč
Modified: 2013-03-03 23:03 UTC (History)
3 users (show)

Fixed In Version: gcc-4.4.6-4.el6
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2012-06-20 14:35:37 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0941 normal SHIPPED_LIVE gcc bug fix and enhancement update 2012-06-19 21:00:22 UTC

Description Karel Klíč 2011-08-08 15:20:50 UTC
Several problems related to debuginfo were found in the gcc-4.4.5-6.el6 package. These issues might affect crash analysis done by Automatic Bug Reporting Tool and its retrace server, and also prevent proper debugging of crashes via GDB.

Debuginfo symbolic links pointing to another path
-------------------------------------------------
Debuginfo package includes a symbolic link to each binary that has the debugging symbols stored there. For gcc, four symbolic links do not point to the right binary, and that makes it impossible to use build ids from a coredump to get a list of packages required by it. Usually, this is a packaging error caused usually by placing identical binary into several locations instead of creating a symlink. If one copy of the binary is SUID/SGID, it is not possible to use symlink. You can add a dependency on bug #727872 and rebuild gcc when that bug is fixed.

- affected binary: /usr/bin/gfortran
  affected package: gcc-gfortran-4.4.5-6.el6.i686
  referenced binary: /usr/bin/i686-redhat-linux-gfortran
  debuginfo symlink: /usr/lib/debug/.build-id/ab/2596fbc114af7f66a7bc4e4c8b7f602511e047
- affected binary: /usr/bin/gcj
  affected package: gcc-java-4.4.5-6.el6.i686
  referenced binary: /usr/bin/i686-redhat-linux-gcj
  debuginfo symlink: /usr/lib/debug/.build-id/d5/c9d9102aae01049db2976340e40da2cc8f063e
- affected binary: /usr/bin/i686-redhat-linux-gcc
  affected package: gcc-4.4.5-6.el6.i686
  referenced binary: /usr/bin/i686-redhat-linux-gcc-4.4.5
  debuginfo symlink: /usr/lib/debug/.build-id/9a/f1968a99a56e7462480afc8934c2b4617c7b48
- affected binary: /usr/bin/gcc
  affected package: gcc-4.4.5-6.el6.i686
  referenced binary: /usr/bin/i686-redhat-linux-gcc-4.4.5
  debuginfo symlink: /usr/lib/debug/.build-id/9a/f1968a99a56e7462480afc8934c2b4617c7b48

This issue has been solved in Fedora by /usr/lib/rpm/find-debuginfo.sh creating additional symlinks for identical binaries. However, symlinks should be used instead of duplicating a binary when possible.

Unused debuginfo files
----------------------
The debuginfo package contains several superfluous files with debugging symbols. This is usually caused by using %exclude in package's spec file instead of deleting the unwanted binary from the build root. This is a low priority issue, unnecessary files cause no harm except wasted space.

- debuginfo path: gcc-debuginfo-4.4.5-6.el6.i686/usr/lib/debug/.build-id/9a/f1968a99a56e7462480afc8934c2b4617c7b48
  associated (missing) binary: /usr/bin/i686-redhat-linux-gcc-4.4.5
  wasted disk space: 309.2 kB
- debuginfo path: gcc-debuginfo-4.4.5-6.el6.i686/usr/lib/debug/.build-id/d8/dce48c59ab6313c1a68e988e766d3c4bd7be38
  associated (missing) binary: /usr/bin/gappletviewer
  wasted disk space: 4.7 kB
- debuginfo path: gcc-debuginfo-4.4.5-6.el6.i686/usr/lib/debug/.build-id/ab/2596fbc114af7f66a7bc4e4c8b7f602511e047
  associated (missing) binary: /usr/bin/i686-redhat-linux-gfortran
  wasted disk space: 320.0 kB
- debuginfo path: gcc-debuginfo-4.4.5-6.el6.i686/usr/lib/debug/.build-id/d5/c9d9102aae01049db2976340e40da2cc8f063e
  associated (missing) binary: /usr/bin/i686-redhat-linux-gcj
  wasted disk space: 328.8 kB
- debuginfo path: gcc-debuginfo-4.4.5-6.el6.i686/usr/lib/debug/.build-id/b2/9fb1deda001a25df893e5a5e98ad87fbf6d870
  associated (missing) binary: /usr/bin/gc-analyze
  wasted disk space: 4.7 kB

Source file missing in debuginfo package
----------------------------------------
Multiple source files that were used by the compiler to generate a binary are missing from the debuginfo package. This is usually caused by the build script creating temporary source files during the build and deleting them after usage, or by moving source files between directories. Missing source files in debuginfo packages make debugging of crashes more difficult.

debuginfo package: gcc-debuginfo-4.4.5-6.el6.i686
  debuginfo file: /usr/lib/debug/usr/lib/libgcj.so.10.0.0.debug
    missing source: /usr/src/debug/gcc-4.4.5-20110214/obj-i686-redhat-linux/i686-redhat-linux/gnu/java/security/Configuration.java
    missing source: /usr/src/debug/libjava/libltdl/ltdl.h
    missing source: /usr/src/debug/libjava/libltdl/ltdl.c
    missing source: /usr/src/debug/gcc-4.4.5-20110214/obj-i686-redhat-linux/i686-redhat-linux/gnu/java/locale/LocaleData.java

Please consider changing the package build script (if that is the cause of this issue) to keep the source files on their compilation place, so rpmbuild can find them when generating debuginfo package.

No .debug_info section in a debug file
--------------------------------------
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/libgcj_bc.so.1.0.0.debug
  package: gcc-debuginfo-4.4.5-6.el6.i686
- path: /usr/lib/debug/usr/bin/gij.debug
  package: gcc-debuginfo-4.4.5-6.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 4 Jakub Jelinek 2012-03-05 14:15:22 UTC
I've hopefully fixed up the first/second category of issues, the third one is an unimportant gcj only issue, the last category is NOTABUG - those binaries/shared libraries really don't contain any code at all, all they are there for is their DT_NEEDED.

Comment 9 Marek Polacek 2012-05-22 13:26:25 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 11 errata-xmlrpc 2012-06-20 14:35:37 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-0941.html


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