[lttng-dev] Is LTTng self-conscious?

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Wed Jul 13 17:44:07 UTC 2016


----- On Jul 13, 2016, at 1:23 PM, Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca wrote:

> Specifically, if LTTng is tracing all system calls on a machine and saving the
> trace locally, does it capture its own system calls (like disc access)?

Yes.

> If it
> does, wouldn't this lead to unending echoes?

If kernel I/O events are traced, and lttng is configured to output the trace
buffers through I/O, yes. Events are written into a ring buffer, and kernel I/O events
can be generated when moving the ring buffer "packets" to disk/network (I/O), which
will lead to further trace data being available.

However, this is not an issue in practice.

It can lead to discarded events if the number of events generated when moving a
trace packet to disk/network would be larger than the number of events per
packet (e.g. very small packets). Even then, it will simply discard events,
without affecting the correctness of the system under load.

However, if we were to implement a "blocking" mode as an alternative to the
"discard" and "overwrite" modes of lttng when dealing with buffer full
conditions, we would need to be very cautious not to deadlock the system in
such situation. With both "discard" and "overwrite" buffering strategies, we
cannot cause system hang even in such extreme situations.

Thanks,

Mathieu

> Example: a disc access occurs, and
> the system call event is captured to the circular event buffer. After a short
> while, the consumer daemon writes the buffer contents to disc, which causes a
> system call event to be captured to the circular event buffer, and so on ad
> infinitam?
> 
>   If LTTng is self-conscious and avoids tracing itself, exactly what does it omit?
> 
> Daniel U. Thibault, M.Sc.²
> 
> Informaticien scientifique, CME-PSC, Centre de recherches de Valcartier
> Recherche et développement pour la défense Canada / Gouvernement du Canada
> daniel.thibault at drdc-rddc.gc.ca / Tél: 418-844-4000x4245 Téléc: 418-844-4538
> daniel.thibault at forces.gc.ca / Tél: 418-844-4000x4245 Téléc: 418-844-4538
> 
> Computer Scientist, MCCS-SPC, Valcartier Research Centre
> Defence Research and Development Canada / Government of Canada
> daniel.thibault at drdc-rddc.gc.ca / Tel: 418-844-4000x4245 Fax: 418-844-4538
> daniel.thibault at forces.gc.ca / Tel: 418-844-4000x4245 Fax: 418-844-4538
> 
> DRDC is an agency of the Department of National Defence / RDDC est une agence du
> ministère de la Défense nationale
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list