Bug 1315841 - preserve debuginfo in libdyninstAPI_RT.so
preserve debuginfo in libdyninstAPI_RT.so
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dyninst (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: William Cohen
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1316956
  Show dependency treegraph
 
Reported: 2016-03-08 13:18 EST by Frank Ch. Eigler
Modified: 2016-05-07 07:46 EDT (History)
7 users (show)

See Also:
Fixed In Version: dyninst-9.1.0-4 dyninst-9.1.0-4.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1316956 (view as bug list)
Environment:
Last Closed: 2016-05-07 07:46:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Missing DLLEXPORT of libdyninstAPI_RT_init_maxthreads (715 bytes, patch)
2016-03-09 13:06 EST, William Cohen
no flags Details | Diff

  None (edit)
Description Frank Ch. Eigler 2016-03-08 13:18:16 EST
Without dyninst-debuginfo installed, the API_RT initialization code dies with "could not find necessary internal variable" ... type messages.  Let's investigate tweaking the build/package system to preserve API_RT.so debuginfo within that file (unstripped) to make this problem stop.
Comment 1 William Cohen 2016-03-09 08:13:55 EST
Is there a simple reproducer for this?  What was the actual output message when it failed?
Comment 2 Michael Petlan 2016-03-09 10:33:35 EST
From IRC:

1) remove dyninst-debuginfo
2) run one of the following:

2a) stap --dyninst -L 'process.function("main@*:*")' -c ./hello

2b) the /tools/dyninst/Sanity/smoke-test testcase

2c) some test from the dyninst-testsuite, for example test4_2
Comment 3 William Cohen 2016-03-09 13:06 EST
Created attachment 1134607 [details]
Missing DLLEXPORT of libdyninstAPI_RT_init_maxthreads

This patch is currently untested.  However, it is likely that this will clear up that particular failure to load a variable.  The tip off is that there was a similar findVarsByAll("libdyninstAPI_RT_init_localPid", vars) earlier in the same function that did work.  Looking for the variable that worked it was found that that libdyninstAPI_RT_init_maxthreads wasn't being exported in dyninstRTEport.h.  There might be missing DLLEXPORTs. Will see after testing this patch.
Comment 4 William Cohen 2016-03-10 15:01:58 EST
The patched version for dyninst has been built for f24 and rawhide.

Note that there is an issue with libdwarf (rbbz #1316695 - libdwarf not checking whether error is null before attempting to use it for dwarf_srcfiles) that will cause a segfault if the dyninst-debuginfo is installed on the machine.
Comment 5 Martin Cermak 2016-03-17 08:13:18 EDT
Looks good here:

=======
# cat test.c 
int main() { return 0; }
# gcc -g test.c 
# rpm -q dyninst
dyninst-9.1.0-3.fc24.x86_64
# rpm -qa | grep dyninst
dyninst-9.1.0-3.fc24.x86_64
dyninst-devel-9.1.0-3.fc24.x86_64
# stap --dyninst -e 'probe process.function("main") { log("hit") }' -c ./a.out 
--SERIOUS-- #0: Dyninst was unable to load the dyninst runtime library into the application.  This may be caused by statically linked executables, or by having dyninst linked against a different version of libelf than it was built with.
--FATAL-- #68: Dyninst was unable to create the specified process
--FATAL-- #68: create process failed bootstrap
stapdyn: ERROR: Couldn't create the target process
WARNING: /usr/local/bin/stapdyn exited with status: 1
Pass 5: run failed.  [man error::pass5]
# 
# 
# rpm -qa | grep dyninst
dyninst-9.1.0-4.fc25.x86_64
dyninst-devel-9.1.0-4.fc25.x86_64
# 
# stap --dyninst -e 'probe process.function("main") { log("hit") }' -c ./a.out 
hit
#
=======

Thanks for the fix!
Comment 6 Fedora Update System 2016-04-28 20:46:52 EDT
dyninst-9.1.0-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-748f888241
Comment 7 Fedora Update System 2016-04-29 13:22:09 EDT
dyninst-9.1.0-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-748f888241
Comment 8 Fedora Update System 2016-05-07 07:46:12 EDT
dyninst-9.1.0-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

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