lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
To: Aleksander Twardowski <aleksander.twardowski@ericsson.com>
Cc: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: Problem with vpid in lttng output
Date: Tue, 3 Sep 2019 11:38:04 -0400	[thread overview]
Message-ID: <20190903153804.GB15770__35519.2201839358$1567525116$gmane$org@joraj-alpa> (raw)
In-Reply-To: <AM0PR07MB5906EED53E454550B5A4503396B90@AM0PR07MB5906.eurprd07.prod.outlook.com>

Hi,

Note that the restriction to prevent an add-context command on a
started session is not present in 2.10.2. It is present starting at 2.10.3.

 joraj@~/lttng/stable-2.10/lttng-tools [(v2.10.7)][]$ git tag --contains 3aaf55eaa5aee2db6e2a1a46685e45f2395fc15b
 v2.10.3
 v2.10.4
 v2.10.5
 v2.10.6
 v2.10.7

This would explain why you can issue the commands in the order you are issuing
them currently (add-context after start).

 lttng create csim_session_rpup -o /tmp/csim_session_rpup
 lttng enable-event -u
 lttng start csim_session_rpup
 lttng add-context -u -t vpid
 lttng track -u -s csim_session_rpup --all

To comply with this without upgrading, you can swap the order of the add-context
and start command.

commands:

 lttng create
 lttng enable-event -u ...
 lttng add-context -u -t vpid
 lttng start
 lttng track ...

I did some experiment using v2.10.2 to reproduce the issue.
I used the same sequence of commands you provided:

 lttng create csim_session_rpup -o /tmp/csim_session_rpup
 lttng enable-event -u
 lttng start csim_session_rpup
 lttng add-context -u -t vpid
 lttng track -u -s csim_session_rpup --all

At first, I tried a scenario where the only instrumented (registered) app is run
after the add-context. No other instrumented apps were running at the moment the
"lttng start" was issued. The trace produced contained the vpid context.

What happen if an instrumented app is already running when the "lttng start"
command is issued? The "lttng add-context" does not report any problem yet the
resulting trace does not contain any vpid context.

In the lttng-sessiond logs we see that the add-context command failed for the app:

  DEBUG2 - 11:19:43.718781 [9499/9506]: UST app adding context to channel channel0 (in create_ust_app_channel_context() at ust-app.c:2357)
  DEBUG3 - 11:19:43.718784 [9499/9506]: UST app context 1 allocated (in alloc_ust_app_ctx() at ust-app.c:1146)
  Error: UST app create channel context failed for app (pid: 7350) with ret -1028
  Error: Failed to add context to channel channel0

The first scenario works because we delay the setup of the channel until an app
eligible for tracing is present.

That should be it.

Cheers

-- 
Jonathan Rajotte-Julien
EfficiOS

  parent reply	other threads:[~2019-09-03 15:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM0PR07MB590692B318D8FC8187D54EEB96BE0@AM0PR07MB5906.eurprd07.prod.outlook.com>
2019-09-02 12:04 ` Problem with vpid in lttng output Aleksander Twardowski via lttng-dev
2019-09-02 19:33 ` Jonathan Rajotte-Julien
     [not found] ` <20190902193349.GA15770@joraj-alpa>
2019-09-03  6:52   ` Aleksander Twardowski via lttng-dev
     [not found]   ` <AM0PR07MB5906EED53E454550B5A4503396B90@AM0PR07MB5906.eurprd07.prod.outlook.com>
2019-09-03 15:38     ` Jonathan Rajotte-Julien [this message]
2019-09-02 12:01 Aleksander Twardowski 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='20190903153804.GB15770__35519.2201839358$1567525116$gmane$org@joraj-alpa' \
    --to=jonathan.rajotte-julien@efficios.com \
    --cc=aleksander.twardowski@ericsson.com \
    --cc=lttng-dev@lists.lttng.org \
    /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).