Error with dlopen on linux 64 bit

Divick Kishore divick.kishore at gmail.com
Mon Nov 16 10:48:05 PST 2015


Hi,
    I am trying to dump traces for an application for which LD_PRELOAD
mechnism cannot work (as it something similar to what android emulator
does). Thus I am trying to trace it using glxtrace.so mechanism as
mentioned in the docs. For some reason it gives error even before it
loads the gl libs. It complains with:

apitrace: tracing to  <path>/python3.4.63.trace
apitrace: error: failed to look up real dlopen
apitrace: error: couldn't find libGL.so

Looking at the sources I see that dlsym/dlopen themselves are wrapped
and the actual lookup happens via glibc internal functions
__libc_dlopen_mode and __libc_dlsym. Furthermore it is able to lookup
dlsym via __libc_dlsym but when it calls this returned pointer with
dlsym_ptr(handle, symbol), it returns a NULL pointer. Also I tried
printing the and dlerror but it print "(null)".

I am not sure why is it unable to lookup the real dlopen.

I would appreciate any help.
Thanks,
Divick


More information about the apitrace mailing list