Bug 1431177

Summary: dyninst is broken on ppc64/fedora
Product: [Fedora] Fedora Reporter: Michael Petlan <mpetlan>
Component: dyninstAssignee: Stan Cox <scox>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: fche, jistone, lberk, mcermak, orion, scox, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dyninst-9.3.2-1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-16 20:20:11 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:
Attachments:
Description Flags
reproducer for static and dynamic instrumentation bug
none
verbose log from dynamic instrumentation none

Description Michael Petlan 2017-03-10 14:21:23 UTC
Description of problem:

While x86_64 seems to be OK, on ppc64, dyninst seems to be not working at all. I have just tried few simple tests for both static and dynamic instrumentation.

Version-Release number of selected component (if applicable):
dyninst-9.2.0-5.fc25.ppc64

How reproducible:
100%

Steps to Reproduce:
1. run the attached reproducer
2.
3.

Actual results:

Static instrumentation creates a segfaulting binary:
(gdb) bt full
#0  0x00003fffb690f620 in DYNINST_lock_tramp_guard () from /usr/lib64/dyninst/libdyninstAPI_RT.so.9.2
No symbol table info available.
#1  0x0000000010100168 in ?? ()
No symbol table info available.
#2  0x0000000000000000 in ?? ()
No symbol table info available.

When trying dynamic instrumentation, the mutator cannot attach the mutatee and causes its crash.

--FATAL-- #68: Dyninst was unable to attach to the specified process
--FATAL-- #68: BPatch.C[1040]: no process 15600 defined in procsByPid

[1]+  Killed                  ./mutatee


Expected results:

Both static and dynamic instrumentation works.

Additional info:

attached log with the following debugging opts enabled:
DYNINST_DEBUG_BPATCH=1
DYNINST_DEBUG_PROCCONTROL=1
DYNINST_DEBUG_RTLIB=1
DYNINST_DEBUG_STARTUP=1
DYNINST_DEBUG_CRASH=1

Comment 1 Michael Petlan 2017-03-10 14:35:26 UTC
Created attachment 1261944 [details]
reproducer for static and dynamic instrumentation bug

Comment 2 Michael Petlan 2017-03-10 14:36:41 UTC
Created attachment 1261945 [details]
verbose log from dynamic instrumentation

Comment 3 Josh Stone 2017-03-10 17:05:28 UTC
Can you try 9.3.1 in rawhide?  Stan is also working on this for f25:
https://koji.fedoraproject.org/koji/buildinfo?buildID=867035

Comment 4 Stan Cox 2017-03-30 00:50:58 UTC
ppc64 9.3.1 is fine for the dynamic case:
% ldd mutator | grep libparseAPI
 libparseAPI.so.9.3 => /usr/lib64/dyninst/libparseAPI.so.9.3 (0x00003fff89a00000)
...b
% cat RESULT.log
MUTATION OK.

There is a problem for the static case which is due to this:
 https://github.com/dyninst/dyninst/issues/355
With that patch in 9.3.1 the test worked fine:
sh run.sh
=== building the code ===
make: Nothing to be done for `all'.
=== running mutator ===
MUTATION DONE. MUTATOR IS GOING...
=== running mutated mutatee ===
MUTATION OK.

So we should probably try to get that patch into a 9.3.1-2

Comment 5 Fedora Admin XMLRPC Client 2017-05-15 19:58:52 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Update System 2017-07-06 13:09:38 UTC
dyninst-9.3.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-67bdf10c5c

Comment 7 Fedora Update System 2017-07-06 18:23:42 UTC
dyninst-9.3.2-1.fc26 has been pushed to the Fedora 26 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-2017-67bdf10c5c

Comment 8 Fedora Update System 2017-07-16 20:20:11 UTC
dyninst-9.3.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.