Re: [DynInst_API:] ppcle detach removes snippets


Date: Tue, 09 Jul 2019 10:01:42 -0500
From: Xiaozhu Meng <mxz297@xxxxxxxxx>
Subject: Re: [DynInst_API:] ppcle detach removes snippets


On Jul 8, 2019, at 10:54 AM, Stan Cox <scox@xxxxxxxxxx> wrote:

The release folks have a smoke test which essentially does:
insertSnippet
continueExecution
detach
This works fine on x8664 and aarch64 but not on a ppcle box (kernel-4.1 8.0-112.el8 glibc-2.28-66.el8)
On ppcle there is no instrumented call to incr; the call to detach removes the instrumented call. If you add a waitForStatusChange before detach (or simply just sleep) then ppcle hits the snippet call to incr just fine.

Here is the example run:

./mutatee -v 10 & LD_LIBRARY_PATH=/usr/lib64/dyninst DYNINSTAPI_RT_LIB=/usr/lib64/dyninst/libdyninstAPI_RT.so ./mutator $!
[1] 106821
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0
MUTATION DONE. MUTATOR IS GOING...
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 0

And the example run with waitForStatusChange added.  But that really should not be necessary as detach should not remove instrumentation, right?

Hi Stan,

I agree that detach should not remove instrumentation. 

Is it a power 8 or power 9 machine? And presumably it is Dyninst 10.1? Is it possible to set up a VM for me to debug this problem?

Before the VM is ready, there are a few quick things for you to try:

(1)  "app_proc->detach(true);" actually will continue the mutatee, so you donât have to call "app_proc->continueExecution();â before it. I know that this combination works on other platforms, but I just want to isolate the problem. Can you see if the same problem occurs if you delete âcontinueExecution()â?

(2)  detach will remove instrumentations in fork, exec, and exit, which are used for controlling the mutatee. Can you go to source file dyninstAPI/src/dynProcess.C and comment out lines between 1064 and 1069? These lines should look like:


        tracedSyscalls_->removePreFork();
        tracedSyscalls_->removePostFork();
        tracedSyscalls_->removePreExec();
        tracedSyscalls_->removePostExec();
        tracedSyscalls_->removePreExit();
        tracedSyscalls_->removePreLwpExit();

If commenting out these lines makes the instrumentation stay, then it means there is some side-effect when removing instrumentation for fork, exec, and exit. Again, this is just for diagnosis, but a real attempt to fix anything.

Thanks,

âXiaozhu





FUNCTION EXECUTED. VALUE = 0
FUNCTION EXECUTED. VALUE = 1
FUNCTION EXECUTED. VALUE = 2
FUNCTION EXECUTED. VALUE = 3
FUNCTION EXECUTED. VALUE = 4
FUNCTION EXECUTED. VALUE = 5
FUNCTION EXECUTED. VALUE = 6
FUNCTION EXECUTED. VALUE = 7
FUNCTION EXECUTED. VALUE = 8
FUNCTION EXECUTED. VALUE = 9
MUTATION DONE. MUTATOR IS GOING...


<dynamic.tar>_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

[← Prev in Thread] Current Thread [Next in Thread→]