[lttng-dev] Tracepoints firing without being enabled in LTTng
Mosleh Uddin
mosleh1235 at gmail.com
Wed Feb 20 21:26:47 EST 2019
Hello,
Thank you everyone for the assistance and quick response. Thankfully adding
the Environment with LD_PRELOAD in the systemd service file was enough to
get everything running smoothly.
Regards,
Mosleh
On Wed, Feb 20, 2019 at 3:06 PM Jonathan Rajotte-Julien <
jonathan.rajotte-julien at efficios.com> wrote:
> > One should be able to add LD_PRELOAD to an Environment line in a
> > systemd unit file. But beware, from ld.so docs:
> >
> > In secure-execution mode, preload pathnames containing slashes are
> > ignored. Furthermore, shared objects are preloaded only from the
> > standard search directories and only if they have set-user-ID mode bit
> > enabled (which is not typical).
>
> Those are all valid constraints and if I'm not mistaken can be controlled
> by a
> system administrator. Thanks for bringing it up.
>
> >
> > Another way that setting ld_preload can be hard is when the program
> > that needs it is started by another process that does not need it.
> > Like say "mount" will fork and exec "losetup". How do you set
> > LD_PRELOAD for just losetup without getting mount too? Modify the code
> > of mount to inject an environment variable?
>
> Unfortunately, for now, yes, if you know that the application that you
> exec is
> instrumented with lttng and will perform either a fork call not followed
> by an
> exec (family) call and/or close all FDs.
>
> > Make a wrapper script
> > named losetup that sets LD_PRELOAD and runs the real losetup binary?
>
> This is valid option.
>
> We do have a potential solution to eliminate the need of preloading the
> fork
> wrapper but we did not yet have time to work on it.
>
> As for the FD lib utility (liblttng-ust-fd) we are open to opinion on how
> to
> solve the problem and make liblttng-ust-fd obsolete.
>
> Cheers
> --
> Jonathan Rajotte-Julien
> EfficiOS
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190220/66a0c776/attachment.html>
More information about the lttng-dev
mailing list