Hi Alberto, The SymtabAPI::Symtab::openFile is intended to open your application, so that we know whether your application is 32-bit or 64-bit and we can load the corresponding Dyninst runtime. You said that "fileName" is just the name of your app. Is it just the file name or it is an actual path to your app? Now, I guess only the file name is passed to the openFile, and your app is not actually located in the current directory. Can you try to run this in the directory of your app?
I will take a look at the compilation issue. Thanks, --Xiaozhu On Fri, Apr 27, 2018 at 5:11 AM, Alberto Olmo <[email protected]> wrote: > Dear Xiaozhu, > > Thanks to your advice I have managed to know in what lines the problems > stems from and, as you pointed out, the error comes from these two lines: > > bool result = SymtabAPI::Symtab::openFile(symt_obj, fileName); >> if( !result ) return false; > > > Apparently, the var *result* becomes 0 after the *openFile* function > fails. The value that *symt_obj* has is *0 *(after the call ends) and the > *fileName > *is just the name of my app. Maybe I am missing something... > > In addition, I have tried to install the PR that you sent me but I am > getting another error while executing the cmake: it cannot find *ddb.db*, > *params.db* nor *unistd.db *from *unstrip_src*. I am attaching the whole > configure log to this email in the event you wanted to see it. > > Thank you ! > > > > > > Alberto Olmo. > > > 2018-04-26 19:17 GMT+02:00 Xiaozhu Meng <[email protected]>: > >> In setenvPreload, before any of the returning false, there is a >> startup_printf >> call, which will print some error message when setting >> DYNINST_DEBUG_STARTUP=1. So, you can add startup_printf before that return, >> run it again, and see if the corresponding message showed up. >> >> For the example issue, you can try this PR (https://github.com/dyninst/dy >> ninst/pull/457), which should fix the problem. >> >> Let me know what you find. >> >> On Thu, Apr 26, 2018 at 11:18 AM, Alberto Olmo <[email protected]> >> wrote: >> >>> Hi Xiaozhu, >>> >>> Sorry, could you please tell me how I can see if that is the line of >>> code that is failing? I believe that should be the one because the error >>> message I am getting apparently comes from the *setenvPreload *function, >>> but I am not 100% sure, >>> >>> At first, I tried to install the current master branch but I got an >>> error with the *CodeCoverage *example where it said that couldn't find >>> it so, I decided to use your tagged versions instead and that problem did >>> not appear to me again, >>> >>> Thanks >>> >>> Alberto Olmo. >>> >>> >>> 2018-04-26 15:29 GMT+02:00 Xiaozhu Meng <[email protected]>: >>> >>>> Hi Alberto, >>>> >>>> I think your errors are caused by function PCProcess::setEnvPreload >>>> (in dyninstAPI/src/unix.C) returning false. In this function, there >>>> are error loggings for returning false, except for one location (Line 334: >>>> bool result = SymtabAPI::Symtab::openFile(symt_obj, fileName); and >>>> Line 335: if( !result ) return false;) >>>> >>>> Can you confirm that it is this line of code causing the error (the >>>> line number may differ because I looked at the current master branch)? >>>> >>>> Another thing to try is to install the current master branch and see if >>>> the same error happens. >>>> >>>> Thanks, >>>> >>>> --Xiaozhu >>>> >>>> On Thu, Apr 26, 2018 at 4:42 AM, Alberto Olmo <[email protected]> >>>> wrote: >>>> >>>>> Hi Xiaozhu, >>>>> >>>>> I have double checked and both libraries that you pointed out were of >>>>> the same version. I have tried to run the program with one or the other >>>>> and >>>>> none of them are found by Dyninst (the same error persists). Also, maybe >>>>> it's very obvious but, I have noticed if I delete *DYNINST_API_RT_LIB* >>>>> and/or *DYNINSTAPI_RT_LIB* environment variables, the error does not >>>>> change either. >>>>> >>>>> Finally, I have also installed Dyninst 9.3.0 in a Lubuntu v17.10 32 >>>>> bit VM and my application seems to work (I haven't been able to make >>>>> v9.3.2 work with the Counter Mutator example in Lubuntu) however, I would >>>>> like to make it work on the CentOS 7. >>>>> >>>>> All of that makes me think that maybe the problem stems from the >>>>> dependencies or something that I am not doing well, but I am definitely >>>>> not >>>>> sure as I could install Dyninst in both machines without any errors. >>>>> >>>>> What would you recommend me that I try next? >>>>> >>>>> Thanks again for your help, >>>>> >>>>> >>>>> Alberto Olmo. >>>>> >>>>> >>>>> 2018-04-25 17:27 GMT+02:00 Xiaozhu Meng <[email protected]>: >>>>> >>>>>> Hi Alberto, >>>>>> >>>>>> From your log for the successful run, it seems like you have multiple >>>>>> instances of Dyninst installed: one in >>>>>> /home/aolmo/soft/dyninst-9.3.2/install/lib/ >>>>>> and the other one in /usr/local/lib/. Do you know whether these two >>>>>> instances of Dyninst are the same version? I would recommend that you >>>>>> ensure that you compile your application and run your application with >>>>>> the >>>>>> exact same installation of Dyninst. >>>>>> >>>>>> I am not sure whether this is the cause, but it is indeed strange >>>>>> that one application can find DyninstRT, but the other one cannot find >>>>>> it. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> --Xiaozhu >>>>>> >>>>>> On Wed, Apr 25, 2018 at 2:02 AM, Alberto Olmo <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> Hello Xiaozhu, >>>>>>> >>>>>>> I have doble checked and I don't get much more debug information >>>>>>> than the one I sent you in the last email. All I can see is this: >>>>>>> >>>>>>> Enabling DyninstAPI startup debug >>>>>>>> Enabling DyninstAPI startup debug >>>>>>>> Failed to set environment var to preload RT library >>>>>>>> --FATAL-- #68: Dyninst was unable to create the specified process >>>>>>>> --FATAL-- #68: create process failed bootstrap >>>>>>>> DynInst Exception: Process creation failed, Object name: my_app >>>>>>>> Creating process my_app in directory ./ >>>>>>>> [140571584620416]dynProcess.C[85]: stdin: 0, stdout: 1, stderr: 2 >>>>>>>> Failed to set environment var to preload RT library >>>>>>>> --FATAL-- #68: Dyninst was unable to create the specified process >>>>>>>> --FATAL-- #68: create process failed bootstrap >>>>>>>> DynInst Exception: Process creation failed, Object name: my_app >>>>>>> >>>>>>> >>>>>>> I have also attached to this email the same log (log.txt) in the >>>>>>> event you wanted to see it in a file as well as the logs from a >>>>>>> successful >>>>>>> Dyninst execution with a synthetic app, that only counts the number of >>>>>>> times a function is called (mutator-counter-log.txt). >>>>>>> >>>>>>> What do you think it may be happening? >>>>>>> >>>>>>> Thank you very much for your help, >>>>>>> >>>>>>> >>>>>>> Alberto Olmo. >>>>>>> >>>>>>> >>>>>>> 2018-04-24 17:19 GMT+02:00 Alberto Olmo <[email protected]>: >>>>>>> >>>>>>>> Hi Xiaozhu, >>>>>>>> >>>>>>>> I currently don't have access to the machine where I have Dyninst >>>>>>>> installed. I will send the debugging log tomorrow if you don't mind, >>>>>>>> I am using a 64 bit CentOS 7, >>>>>>>> >>>>>>>> Thanks for your rapid response, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Alberto Olmo. >>>>>>>> >>>>>>>> >>>>>>>> 2018-04-24 16:49 GMT+02:00 Xiaozhu Meng <[email protected]>: >>>>>>>> >>>>>>>>> Hi Alberto, >>>>>>>>> >>>>>>>>> What's your platform (windows or linux; 32bit or 64bit)? Could you >>>>>>>>> send me the debugging log from DYNINST_DEBUG_STARTUP=1? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> --Xiaozhu >>>>>>>>> >>>>>>>>> On Tue, Apr 24, 2018 at 4:49 AM, Alberto Olmo <[email protected] >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> To whom it may concern, >>>>>>>>>> >>>>>>>>>> My name is Alberto, a student at the Universitat Autonoma de >>>>>>>>>> Barcelona, and I am currently trying to install the Dyninst API in >>>>>>>>>> order to >>>>>>>>>> use it in another application. I have been able to install version >>>>>>>>>> 9.3.2 >>>>>>>>>> and its dependencies and test it with a small program which counts >>>>>>>>>> the >>>>>>>>>> number of times a function is called. It works correctly. >>>>>>>>>> >>>>>>>>>> However, now I am trying to use it in another application which >>>>>>>>>> (I think) needs to call BPatch::processCreate and I get the following >>>>>>>>>> errors: >>>>>>>>>> >>>>>>>>>> Failed to set environment var to preload RT library >>>>>>>>>>> --FATAL-- #68: Dyninst was unable to create the specified process >>>>>>>>>>> --FATAL-- #68: create process failed bootstrap >>>>>>>>>> >>>>>>>>>> DynInst Exception: Process creation failed, Object name: my_app >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> I do have exported variables *DYNINSTAPI_RT_LIB* and >>>>>>>>>> *DYNINST_API_RT_LIB* to point to *libdyninstAPI_RT.so* (I think >>>>>>>>>> depending on the Dyninst version one or the other is needed) as well >>>>>>>>>> as set >>>>>>>>>> the flag *DYNINST_DEBUG_STARTUP=1* to get more information about >>>>>>>>>> the problem. >>>>>>>>>> >>>>>>>>>> I have also tried with older versions but the error I get is >>>>>>>>>> exactly the same, >>>>>>>>>> >>>>>>>>>> What would you recommend me that I try? >>>>>>>>>> >>>>>>>>>> I would really appreciate any help you could provide me, >>>>>>>>>> Thank you very much in advance and sorry for the inconveniences, >>>>>>>>>> >>>>>>>>>> Alberto Olmo. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Dyninst-api mailing list >>>>>>>>>> [email protected] >>>>>>>>>> https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >
_______________________________________________ Dyninst-api mailing list [email protected] https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
