I am having weird side effects when changing LD_LIBRARY_PATH .
When I add a path containing a library, for example.
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my_path/lib
Then everything becomes incredibly slow. For example, a simple ls can last 10 seconds.
ldd output is exactly the same before and after changing LD_LIBRARY_PATH , and I tried to debug the execution of slow ls with strace : I get the same execution in both cases. Execution doesn't even get stuck at ls runtime (since strace doesn't output anything during a 10 second lag, and then unexpectedly executes ls fine). Therefore, I thought that this could come from my shell, but itβs the same, running strace on my bash and executing ls in both cases gives me the same strace result: the shell executes ls and waits to complete its execution (the last strace exits before delay strace is waitpid(...) ). Therefore, I assume that something is wrong between running ls and executing it, as if it were a kernel level issue. This really works if sleep was done on ls (using 0 cpu).
During the lag, my processor and network activity are absolutely normal ...
Note that the library in the new LD path does not conflict with any "standard library", so in my example this does not interfere with ls .
Therefore, I am interested in explaining in more detail the side effects of LD_LIBRARY_PATH or how to deeply debug my example.
Julio Guerra
source share