From: MONTET Julien via lttng-dev <lttng-dev@lists.lttng.org>
To: Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
Cc: lttng-dev <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] Issues on basic LTTng trace userspace (tutorial)
Date: Wed, 24 Mar 2021 18:55:37 +0000 [thread overview]
Message-ID: <PR3PR02MB6202B24C2EBFF492A659DFF1D1639@PR3PR02MB6202.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <20210324163611.GF344120@joraj-alpa>
[-- Attachment #1.1: Type: text/plain, Size: 3404 bytes --]
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@efficios.com>
Envoyé : mercredi 24 mars 2021 17:36
À : MONTET Julien <julien.montet@reseau.eseo.fr>
Cc : lttng-dev <lttng-dev@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@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@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
[-- Attachment #1.2: Type: text/html, Size: 7165 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2021-03-24 18:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 11:29 [lttng-dev] Issues on basic LTTng trace userspace (tutorial) MONTET Julien via lttng-dev
2021-03-24 14:25 ` Jonathan Rajotte-Julien via lttng-dev
[not found] ` <PR3PR02MB6202F969540C279A6A171F83D1639@PR3PR02MB6202.eurprd02.prod.outlook.com>
2021-03-24 15:32 ` Jonathan Rajotte-Julien via lttng-dev
2021-03-24 15:53 ` MONTET Julien via lttng-dev
2021-03-24 16:06 ` Jonathan Rajotte-Julien via lttng-dev
2021-03-24 16:36 ` Jonathan Rajotte-Julien via lttng-dev
2021-03-24 18:55 ` MONTET Julien via lttng-dev [this message]
2021-03-24 19:00 ` Jonathan Rajotte-Julien via lttng-dev
2021-03-24 19:08 ` MONTET Julien via lttng-dev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PR3PR02MB6202B24C2EBFF492A659DFF1D1639@PR3PR02MB6202.eurprd02.prod.outlook.com \
--to=lttng-dev@lists.lttng.org \
--cc=jonathan.rajotte-julien@efficios.com \
--cc=julien.montet@reseau.eseo.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).