All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
To: "Kramer, Zach" <Zach.Kramer@cognex.com>
Cc: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: [EXTERNAL] Re: Problem with application changing UID
Date: Tue, 24 Sep 2019 14:45:12 -0400	[thread overview]
Message-ID: <20190924184512.GL187569__26227.4043679767$1569350735$gmane$org@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

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SN4PR0601MB3614967ABCE12621B316C89D91840@SN4PR0601MB3614.namprd06.prod.outlook.com>
2019-09-24 15:07 ` Problem with application changing UID Jonathan Rajotte-Julien
2019-09-24 15:15 ` Jonathan Rajotte-Julien
     [not found] ` <20190924151515.GH187569@joraj-alpa>
2019-09-24 15:52   ` [EXTERNAL] " Kramer, Zach
     [not found] ` <20190924150754.GG187569@joraj-alpa>
2019-09-24 16:01   ` Kramer, Zach
     [not found]   ` <SN4PR0601MB36143DD719CB75559F9ABDD891840@SN4PR0601MB3614.namprd06.prod.outlook.com>
2019-09-24 16:06     ` Jonathan Rajotte-Julien
     [not found]     ` <20190924160604.GK187569@joraj-alpa>
2019-09-24 16:13       ` Kramer, Zach
     [not found]       ` <SN4PR0601MB361479BD3396866D29AA39F791840@SN4PR0601MB3614.namprd06.prod.outlook.com>
2019-09-24 18:45         ` Jonathan Rajotte-Julien [this message]
2019-09-27 14:07     ` Kramer, Zach
     [not found]     ` <SN4PR0601MB36145C3D44B796739CD7AF0691810@SN4PR0601MB3614.namprd06.prod.outlook.com>
2019-09-30 19:56       ` Mathieu Desnoyers
     [not found]       ` <1505194855.4263.1569873368480.JavaMail.zimbra@efficios.com>
2019-10-07 13:25         ` 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__26227.4043679767$1569350735$gmane$org@joraj-alpa' \
    --to=jonathan.rajotte-julien@efficios.com \
    --cc=Zach.Kramer@cognex.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.