| Date: | Wed, 18 Feb 2015 20:00:59 +0100 |
|---|---|
| From: | Gerard <ggarcia@xxxxxxxxxxxx> |
| Subject: | Re: [DynInst_API:] Hung process |
|
I'm not sure at which point it hangs, but I have set up an example that I think mimics what happens with my application. In this example the mutatee hangs after creatingÂ32294 threads. I'm using the latest master version. Thanks, Gerard 2015-02-16 18:51 GMT+01:00 Bill Williams <bill@xxxxxxxxxxx>: On 02/16/2015 10:35 AM, Gerard wrote: #include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
static int i = 0;
void *dummy_thread(void *v)
{
printf("%d\n", i++);
pthread_exit(NULL);
}
int main(int argc, char const *argv[])
{
while (1) {
pthread_t dummy_t;
pthread_create(&dummy_t, NULL, dummy_thread, NULL);
pthread_join(dummy_t, NULL);
}
return 0;
}#include "BPatch.h"
#include "BPatch_addressSpace.h"
#include "BPatch_process.h"
#include "BPatch_binaryEdit.h"
#include "BPatch_function.h"
#include "BPatch_point.h"
#include "BPatch_flowGraph.h"
#define DYNINSTAPI_RT_LIB "/usr/local/lib64/libdyninstAPI_RT.so"
BPatch bpatch;
int main(int argc, char const *argv[])
{
setenv("DYNINSTAPI_RT_LIB", DYNINSTAPI_RT_LIB, 0);
bpatch.setTrampRecursive(true);
bpatch.setSaveFPR(false);
char const *mutatee_argv[] = {
"mutatee",
NULL
};
BPatch_addressSpace *app = bpatch.processCreate("./mutatee", mutatee_argv);
BPatch_process *appProc = dynamic_cast<BPatch_process *>(app);
appProc->continueExecution();
while(!appProc->isTerminated()){
bpatch.waitForStatusChange();
}
return 0;
}
|
| [← Prev in Thread] | Current Thread | [Next in Thread→] |
|---|---|---|
| ||
| Previous by Date: | Re: [DynInst_API:] Is the dynamic mode dyninst disable ptrace?, Xi Chen |
|---|---|
| Next by Date: | Re: [DynInst_API:] Hung process, Bill Williams |
| Previous by Thread: | Re: [DynInst_API:] Hung process, Bill Williams |
| Next by Thread: | Re: [DynInst_API:] Hung process, Bill Williams |
| Indexes: | [Date] [Thread] |