[lttng-dev] Issues on basic LTTng trace userspace (tutorial)
MONTET Julien
julien.montet at reseau.eseo.fr
Wed Mar 24 14:55:37 EDT 2021
Hi Jonathan,
You are absolutely right !
I have two different lttng : find /usr -name "*liblttng-ust*" Ubuntu Pastebin<https://paste.ubuntu.com/p/NVtXPhj4fW/>
According to you, what would be the best solution to solve this issue ?
I have indeed a folder named lttng-ust where I have made the (wrong) configure / make.
I tried to (temporary) remove all the libttng* /usr/local/lib/, but I face this problem :
/usr/bin/ld: hello-tp.o: in function `__lttng_events_init__hello_world':
hello-tp.c:(.text+0xe56): undefined reference to `lttng_ust_probe_register'
/usr/bin/ld: hello-tp.o: in function `__lttng_events_exit__hello_world':
hello-tp.c:(.text+0xeb2): undefined reference to `lttng_ust_probe_unregister'
collect2: error: ld returned 1 exit status
In the worst case scenario I am able to get my last clean snapchot.
What would you advise me to do ?
Cheers,
________________________________
De : Jonathan Rajotte-Julien <jonathan.rajotte-julien at efficios.com>
Envoyé : mercredi 24 mars 2021 17:36
À : MONTET Julien <julien.montet at reseau.eseo.fr>
Cc : lttng-dev <lttng-dev at lists.lttng.org>
Objet : Re: [lttng-dev] Issues on basic LTTng trace userspace (tutorial)
Hi Julien,
> TBH nothing points toward a problem here. I would need to spawn a 20.04 to check
> if something is broken, I might have time later today.
Finally I had a Vagrant definition file laying around for the stable-2.12 ppa
that let me bring up a vm easily. All seems fine.
How lttng is installed:
add-apt-repository ppa:lttng/stable-2.12 -y
apt-get update
apt-get install -y lttng-tools lttng-modules-dkms babeltrace2 liblttng-ust-dev
>From there all the steps for building the userspace application works without
ANY modifications.
The app is able to connect itself to the global sessiond: https://paste.ubuntu.com/p/QnfqbtgpFF/
Note that no local sessiond is present hence why the app does not communicate
with one.
Note that the user I am using here (vagrant) is not part of the "tracing" group
hence the user cannot interact with the global sessiond.
Such scenario return the following:
vagrant at ubuntu2004:~$ lttng list -u
Error: Unable to list UST events: No session daemon is available
Now let's start a lttng-sessiond for the user and restart our app (note that
this is not required for day to day tracing since a running app will connect
itself and only for debugging purpose):
lttng-sessiond -b
LTTNG_UST_DEBUG=1 ./hello
Yielding: https://paste.ubuntu.com/p/MsnHt94FXZ/
Now the app is connected to both sessiond.
Now the user can list the event against the local lttng-sessiond:
vagrant at ubuntu2004:~$ lttng list -u
UST events:
-------------
PID: 15429 - Name: ./hello
lttng_ust_tracelog:TRACE_DEBUG (loglevel: TRACE_DEBUG (14)) (type: tracepoint)
lttng_ust_tracelog:TRACE_DEBUG_LINE (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)
So based on this I would say that either we are not given the full picture of
what is going on or there is a step you are missing. One explication would be
that you end up linking against a older lttng-ust without knowing it.
Please run this an provide the output via a paste service:
find /usr -name "*liblttng-ust*"
For example on my VM: https://paste.ubuntu.com/p/Tjxn3V7g5j/
Cheers
--
Jonathan Rajotte-Julien
EfficiOS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20210324/38c30ca0/attachment-0001.htm>
More information about the lttng-dev
mailing list