Open AndrewFasano opened 2 years ago
I've had the same problem, running locally without Docker, with PyPanda installed from source Why is dlerror null? The error originates in callbacks.c:198, with the call to dlopen (see below). I'm not familiar enough with dlopen to understand the implications of using those three flags together:
I've been running into this problem as well when running locally in Ubuntu 22 installed from source.
As a small test of dlopen
, the use of the RTLD_NOLOAD
flag means that if it is the first time libpanda-x86_64.so
is being loaded, then dlopen
will return NULL.
As an example POC:
#include <stdio.h>
#include <dlfcn.h>
int main() {
void * rv = dlopen("/usr/local/lib/python3.10/dist-packages/pandare/data//x86_64-softmmu/libpanda-x86_64.so", RTLD_LAZY | RTLD_NOLOAD | RTLD_GLOBAL);
void * rv2 = dlopen("/usr/local/lib/python3.10/dist-packages/pandare/data//x86_64-softmmu/libpanda-x86_64.so", RTLD_LAZY | RTLD_LOCAL);
void * rv3 = dlopen("/usr/local/lib/python3.10/dist-packages/pandare/data//x86_64-softmmu/libpanda-x86_64.so", RTLD_LAZY | RTLD_NOLOAD | RTLD_GLOBAL);
printf("rv = %p\n", rv);
printf("rv2 = %p\n", rv2);
printf("rv3 = %p\n", rv3);
return 0;
}
$ gcc test_dlopen.c
$ ./a.out
rv = (nil)
rv2 = 0x55ac517ea300
rv3 = 0x55ac517ea300
My workaround right now is just to use the Panda
API like in run_dbg.py instead of using snake_hook
.
I'm analyzing an x86_64 recording of the generic image using proc_trace and trying to use the snake_hook plugin to run graph.py :
After snake_hook is loaded, PANDA raises a fatal error that it's unable to load OSI, but I'm not sure why. The
panda_osi.so
file does exist and I believe I've specified the right OS name.