[lttng-dev] Python lttngust module import error

Kienan Stewart kstewart at efficios.com
Mon Jan 8 10:10:31 EST 2024


Hi Lakshmi,

could you elaborate on which version of lttngust you have and how you 
installed it?

One possibility that I can imagine is that your ldconfig cache is out of 
date for some reason - `ldconfig -p` will simply print the contents of 
the cache - perhaps the files are no longer in the location specified in 
that cache?

thanks,
kienan


On 12/26/23 11:19, Lakshmi Deverkonda via lttng-dev wrote:
> Hi,
> 
> I'm observing an issue recently wrt import of python3 lttng module.
> Following is the error and need your help to find out what is wrong.
> 
>>>> import lttngust
> Exception in thread system:
> Traceback (most recent call last):
>    File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
>      self.run()
>    File "/usr/lib/python3.7/threading.py", line 865, in run
>      self._target(*self._args, **self._kwargs)
>    File "/usr/local/lib/python3.7/dist-packages/lttngust/agent.py", line 
> 291, in _client_thread_target
>      client = _TcpClient(name, _SESSIOND_HOST, port, reg_queue)
>    File "/usr/local/lib/python3.7/dist-packages/lttngust/agent.py", line 
> 76, in __init__
>      raise e
>    File "/usr/local/lib/python3.7/dist-packages/lttngust/agent.py", line 
> 73, in __init__
>      self._log_handler = lttngust.loghandler._Handler()
>    File "/usr/local/lib/python3.7/dist-packages/lttngust/loghandler.py", 
> line 32, in __init__
>      self.agent_lib = ctypes.cdll.LoadLibrary(_Handler._LIB_NAME)
>    File "/usr/lib/python3.7/ctypes/__init__.py", line 434, in LoadLibrary
>      return self._dlltype(name)
>    File "/usr/lib/python3.7/ctypes/__init__.py", line 356, in __init__
>      self._handle = _dlopen(self._name, mode)
> *OSError: liblttng-ust-python-agent.so: cannot open shared object file: 
> No such file or directory*
> 
> 
>>>>
> 
> I have installed *liblttng-ust-python-agent.so*
> *
> *
> /# ldconfig -p | grep liblttng
>       liblttng-ust.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust.so.0
>       liblttng-ust-tracepoint.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-tracepoint.so.0
>       *liblttng-ust-python-agent.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-python-agent.so.0*
>       liblttng-ust-pthread-wrapper.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-pthread-wrapper.so.0
>       liblttng-ust-libc-wrapper.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-libc-wrapper.so.0
>       liblttng-ust-fork.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-fork.so.0
>       liblttng-ust-fd.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-fd.so.0
>       liblttng-ust-dl.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-dl.so.0
>       liblttng-ust-cyg-profile.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-cyg-profile.so.0
>       liblttng-ust-cyg-profile-fast.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-cyg-profile-fast.so.0
>       liblttng-ust-ctl.so.4 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ust-ctl.so.4
>       liblttng-ctl.so.0 (libc6,x86-64) => 
> /lib/x86_64-linux-gnu/liblttng-ctl.so.0
> 
> 
> Regards,
> Lakshmi
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


More information about the lttng-dev mailing list