[lttng-dev] Issues on basic LTTng trace userspace (tutorial)
    Jonathan Rajotte-Julien 
    jonathan.rajotte-julien at efficios.com
       
    Wed Mar 24 12:36:11 EDT 2021
    
    
  
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
    
    
More information about the lttng-dev
mailing list