Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: jonathan.rajotte-julien@efficios.com (Jonathan Rajotte-Julien)
Subject: [lttng-dev] [EXTERNAL] Re: Problem with application changing UID
Date: Tue, 24 Sep 2019 14:45:12 -0400	[thread overview]
Message-ID: <20190924184512.GL187569@joraj-alpa> (raw)
In-Reply-To: <SN4PR0601MB361479BD3396866D29AA39F791840@SN4PR0601MB3614.namprd06.prod.outlook.com>

On Tue, Sep 24, 2019 at 04:13:13PM +0000, Kramer, Zach wrote:
> Hi Jonathan,
> 
> Thanks for the extra info. We do indeed fork without a following exec call and
> I experimented with this preloading recently. When I experimented, I noticed
> no difference in the tracing when I preload liblttng-ust-fork.so. What exactly
> is the consequence of not doing this?

It mostly ensure that the state of lttng-ust for the child is valid and the
child will register to lttng-sessiond. It allows the child to trace between the
fork call and the exec call if any.

https://github.com/lttng/lttng-ust/blob/f596de62e69d1942ec545b8ba6b8f8b7244f8fb4/liblttng-ust/lttng-ust-comm.c#L2097

So in your case you definitely need it.

The immediate consequence is that some context information will be completely wrong (pid/vtid).

Mathieu Desnoyers could provide more information on the deeper side effects of
not using the fork wrapper given that no exec call is done. I'm not completely
sure of the possible side effects on the tracing buffers.

Cheers

-- 
Jonathan Rajotte-Julien
EfficiOS


  reply	other threads:[~2019-09-24 18:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 14:32 [lttng-dev] " Kramer, Zach
2019-09-24 15:07 ` Jonathan Rajotte-Julien
2019-09-24 16:01   ` [lttng-dev] [EXTERNAL] " Kramer, Zach
2019-09-24 16:06     ` Jonathan Rajotte-Julien
2019-09-24 16:13       ` Kramer, Zach
2019-09-24 18:45         ` Jonathan Rajotte-Julien [this message]
2019-09-27 14:07     ` Kramer, Zach
2019-09-30 19:56       ` Mathieu Desnoyers
2019-09-24 15:15 ` [lttng-dev] " Jonathan Rajotte-Julien
2019-09-24 15:52   ` [lttng-dev] [EXTERNAL] " Kramer, Zach

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=20190924184512.GL187569@joraj-alpa \
    --to=jonathan.rajotte-julien@efficios.com \
    /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