Bug 1280497 - [Supportability] Build OpenShift with DWARF
[Supportability] Build OpenShift with DWARF
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build (Show other bugs)
x86_64 Linux
high Severity medium
: ---
: ---
Assigned To: Troy Dawson
Wenjing Zheng
: Extras
Depends On: 1280068
Blocks: 1267746
  Show dependency treegraph
Reported: 2015-11-11 17:02 EST by Eric Rich
Modified: 2016-01-26 14:17 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1280068
Last Closed: 2016-01-26 14:17:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1225093 None None None Never

  None (edit)
Description Eric Rich 2015-11-11 17:02:10 EST
+++ This bug was initially created as a clone of Bug #1280068 +++

Description of problem:

debug symbols are currently not included in openshift binaries, and we are unable to strip debug symbols into *debug packages (https://bugzilla.redhat.com/show_bug.cgi?id=1236317).

Without DWARF debug info, GSS is unable to analyze docker core files.

Version-Release number of selected component (if applicable):

All versions of OpenShift

How reproducible:


Steps to Reproduce:
1. generate a OpenShift corefile
2. open the core file up in gdb

Actual results:

No real usable information can be obtained

Expected results:

docker core can be analyzed as effectively as any other core file.

Additional info:
Comment 1 Clayton Coleman 2015-11-12 02:20:17 EST
Interesting, Origin had Dwarf at one point and I don't recall anyone removing it.
Comment 5 Troy Dawson 2016-01-05 16:11:15 EST
This turned out to be a rpmbuild problem, and if being fixed by this pull request.
Basically we are just adding
%global __os_install_post %{_rpmconfigdir}/brp-compress

Before it put's everything in it's proper rpm, rpmbuild tries to make things as small as possible.  We were already skipping the part where it pulls out the debuginfo (which breaks go packages), but there is another step called brp-strip-static-archive.
According to rpmbuild, go binaries are static-archive's, and so it was stripping the debug stuff out of them.

Why did origin have dwarf debugging and then it didn't?
Origin has always been compiled with the DWARF debugging on.
We originally were not packaging origin into rpms.  They were either in tarballs, images, or compiled locally.
When we started putting it into rpm's was when we started looking the debuginfo.

NOTE: How to tell if the binary has dwarf debug in it or not.
1 - Run something that will take some time
  /usr/bin/oc status  # On a non-setup machine, this takes a while to timeout

2 - Find out the process id
  ps ax | grep status | grep oc

3 - gdb attach to that process and look if it was able to load debuginfo for that process.

3a - No DWARF debugging
  gdb attach 4237
  Attaching to process 4237
  Reading symbols from /usr/bin/oc...(no debugging symbols found)...done.

3b - DWARF debugging in binary
  gdb attach 8138
  Attaching to process 8138
  Reading symbols from /usr/bin/oc...done.
Comment 7 Wenjing Zheng 2016-01-12 01:11:22 EST
Verified with atomic-openshift- to Attaching to process 30758
Reading symbols from /usr/bin/oc...done.
Comment 8 Wenjing Zheng 2016-01-14 21:47:24 EST
I can reproduce this issue with AEP container install RH7.2 env with below version:
openshift v3.1.1.3
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

Here is the result, so will re-open this bug now:
Attaching to process 6456
Reading symbols from /usr/bin/bash...Reading symbols from /usr/bin/bash...(no debugging symbols found)...done.
Comment 9 Troy Dawson 2016-01-14 23:40:27 EST
This ticket isn't about /usr/bin/bash, it is about /usr/bin/oc, or any of the binaries that come from openshift.

Please re-test against /usr/bin/oc, or /usr/bin/openshift.
Comment 10 Wenjing Zheng 2016-01-15 01:29:59 EST
Thanks, it works now:
For container env, oc/openshift binary should be copied out from atomic-openshift-master container:
1. docker cp atomic-openshift-master:/usr/bin/oc ./
2. ./oc get pods --watch
3. ps-ef | grep oc
4. gdb attach <oc_process_id>
Attaching to process 12699
Reading symbols from /root/oc...done.
Comment 12 errata-xmlrpc 2016-01-26 14:17:23 EST
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.


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