[lttng-dev] [RELEASE] LTTng-UST 2.9.7 (EOL), 2.10.6 (Linux user-space tracer)

2019-10-17 Thread Mathieu Desnoyers
Hi,

We are pleased to announce the 2.9.7 (EOL) and 2.10.6 stable releases
of the LTTng-UST 2.9 and 2.10 stable branches.

LTTng-UST, the Linux Trace Toolkit Next Generation Userspace Tracer,
is a low-overhead application tracer. The library "liblttng-ust" enables
tracing of applications and libraries.

* New in this release:

Important fixes to the lttng-ust fd tracker (liblttng-ust-fd.so) were done,
taking care of locking the fd tracker across fork() in the liblttng-ust-fork.so
wrapper, eliminating hangs observed in the child if the parent was executing
close() concurrently with fork(). Also, given that close() is an 
async-signal-safe
function, ensure that the synchronization strategy is robust against signals
by disabling signals and using a TLS nesting counter when taking the fd tracker
lock. [1, 2]

Another important fix to the lttng-ust fd tracker is disabling thread
cancellation around fd tracker lock, and locking the fd tracker across
fork() in the liblttng-ust-fork.so wrapper. Failure to do so causes
deadlocks in child applications if a pthread cancellation is performed
on a thread while it ran the liblttng-ust-fd close(3) wrapper. [3]

The locking strategy of the LTTng perf counter contexts was revisited to
eliminate a deadlock occurring once in a while when using the perf counters
context with lttng-ust. [4]

Now that the release of LTTng-UST 2.11.0 is imminent, version 2.9.7 marks
the end of life (EOL) of the 2.9 stable branch of LTTng-UST.

Thanks!

Mathieu

Project website: http://lttng.org
Documentation: http://lttng.org/docs
Download link: http://lttng.org/download

[1] https://bugs.lttng.org/issues/1199
[2] https://bugs.lttng.org/issues/1200
[3] https://bugs.lttng.org/issues/1201
[4] https://bugs.lttng.org/issues/1202

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-modules 2.9.15 (EOL), 2.10.12 (Linux kernel tracer)

2019-10-17 Thread Mathieu Desnoyers
Hi,

We are pleased to announce the 2.9.15 (EOL) and 2.10.12 stable releases
of the LTTng-modules project 2.9 and 2.10 stable branches.

The LTTng modules provide Linux kernel tracing capability to the LTTng
tracer toolset.

* New in these release:

Both releases contain an update the the scheduler "prev_state" field
of the sched_switch event. It now traces payload which matches the
various changes that went through the various upstream Linux kernel
versions.

Now that the release of LTTng-modules 2.11.0 is imminent, version
2.9.15 marks the end of life (EOL) of the 2.9 stable branch of
LTTng-modules.

Thanks!

Mathieu

Project website: http://lttng.org
Documentation: http://lttng.org/docs
Download link: http://lttng.org/download

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] Babeltrace 2.0.0-rc1

2019-10-17 Thread Jérémie Galarneau
Hi everyone!

We're very excited to announce the first Babeltrace 2.0 release
candidate! 😃

A prettified version of this announcement is available at:
https://diamon.org/babeltrace/docs/release-notes/babeltrace-2.0.0-rc1-release-notes.html

What's new since Babeltrace 2.0.0-pre5?
===
Babeltrace 2.0.0-pre5 was released 3 May 2019.

We brought many improvements to the CLI, the project plugins, and the
library and its Python bindings.

We also updated all the Babeltrace 2 manual pages.

The build-time and run-time requirements for Babeltrace 2.0.0-rc1
are updated:

* Babeltrace 2.0.0-rc1 does not need the popt library anymore to
  parse command-line arguments.

  We wrote our own command-line argument parser to remove this obsolete
  requirement and to support advanced, position-dependent parsing.

* Babeltrace 2.0.0-rc1 requires GLib ≥ 2.28 at build time and run time
  instead of the previous ≥ 2.22 requirement.

Command-line interface
--

Automatic source component discovery

With the `convert` [1] command's new **automatic source component
discovery** feature, specify a path, URI, or arbitrary string to let
`babeltrace2` find the most appropriate components to use:

$ babeltrace2 /path/to/ctf/trace
$ babeltrace2 net://localhost/host/myhost/my-session

This means you don't need to create an explicit component with the
`--component` [2] option most of the time.

Behind the scenes, this feature queries the
`babeltrace.support-info` [3] object from all known component classes: a
component class can reply with a confidence score to indicate its
ability to handle a given path or custom string.

For example, a `source.ctf.fs` [4] (CTF trace directory source)
component class replies to this query whether or not the given path
looks like a CTF trace directory.

NOTE: Source component classes do _not_ have to implement the
`babeltrace.support-info` query. If a component class does not implement
this query, the automatic source component discovery algorithm won't
consider it. In that case, you must instantiate such a component class
explicitly with the `--component` option.

Plugins
---

New `sink.text.details` component class
~~~
This new component [5] pretty-prints all the details of the messages it
consumes.

The output is optimized to be human-readable, yet it is deterministic
for testing and debugging purposes.

You can use a `sink.text.details` component to easily inspect messages
flowing at any point of a graph and make it easy to test and
troubleshoot other component classes.

The Babeltrace 2 project uses this component class for many tests.

`source.ctf.fs`
~~~
A `source.ctf.fs` [4] component can now open and read malformed CTF
traces produced by tracers having known bugs and corner cases
(LTTng-UST [6], LTTng-modules, and barectf [7]).

For example, a `source.ctf.fs` component can now read data streams which
the `lttng-crash` [8] tool generates, even if the last packets can be
malformed.

See the "Trace quirks" [9] section of the `babeltrace2-source.ctf.fs(7)`
manual page for more details.

Library and Python bindings
---

Library-specific: simple sink component
~~~
Add a sink component to a graph easily using the new **simple sink
component** C API.

A simple sink component is a sink component with a single input port and
a single message iterator.

This interface reduces the amount of code you need to write to create a
basic Babeltrace 2 message consumer.

Just provide a consumption user function which receives the component's
message iterator to consume upstream messages.

You can also implement other user functions:

Initialization function:
Called once during the initialization phase of the graph.

Finalization function:
Called once during the finalization phase of the graph.

Python-specific: automatic source component discovery using
~~~
`bt2.TraceCollectionMessageIterator`

Integrate the same **automatic source component discovery** mechanism
which the `babeltrace2` CLI's `convert` [1] command uses to a Python
application using a `bt2.TraceCollectionMessageIterator` object.

With a `bt2.TraceCollectionMessageIterator` object, your application can
access additional component classes installed on the system from the get
go.

New field class types
~
New field classes are available in libbabeltrace2 and its Python
bindings to support eventual, new CTF 2 field classes.

The new fields are:

Boolean:
Contains a boolean value.

Bit array:
Contains a fixed-size array of bits.

A bit array field can represent a CPU status or flag register value,
for example.

Unlike integer fields, a bit array field is _not_ a numerical field.

Option:
Contains an optional f

[lttng-dev] [RELEASE] LTTng 2.11.0 - Lafontaine (Linux kernel and user-space tracer)

2019-10-17 Thread Mathieu Desnoyers
Hi,

This is a combined release announcement for the 2.11.0 - "Lafontaine"
release of the LTTng Tools, LTTng UST, and LTTng modules projects.

This release is named after a modern Saison beer from Montréal's Oshlag
microbrewery. It is a refreshing, zesty, rice beer with hints of fruit
and spices. Some even say it makes for a great Somaek when mixed with
Chamisul Soju, not that we've tried!

Lafontaine is also a tongue-in-cheek reference to a water leak that
affected EfficiOS's offices during the development of this release.

The most notable features of this new release are:

  - Session rotation,
  - Dynamic tracing of user-space (LTTng-modules),
  - Support for arrays and bitwise binary operators in filters,
  - User and kernel space call stack capture from the LTTng-modules
kernel tracer (LTTng-modules),
  - Improved networking performance of the relay daemon,
  - Take NUMA configuration into account for UST buffer allocation
(LTTng-UST),
  - Support unloading of probe providers (dlclose) (LTTng-UST).

Important point: since we needed to change the layout of the
LTTng-UST shared buffers in this release, we had to bump the ABI
major version between LTTng-UST and lttng-sessiond from 7 to 8.
Therefore, if incompatible lttng-ust and lttng-sessiond attempt
to interact, lttng-ust will not perform any tracing. Make sure
you upgrade both lttng-tools and lttng-ust.

This release has been brewing for two years. Indeed, LTTng 2.10.0
was released in August 2017, a little more than two years ago.
This means we even had the chance to publish talks and material
presenting the features introduced in this release already.
[1, 2, 3, 4, 5]

Read on for a short description of each of these features.


-- Session rotation --

The biggest feature of this release is the long-awaited session
rotation support. Session rotations now allow you to rotate an
ongoing tracing session much in the same way as you would rotate
logs.

The 'lttng rotate' command rotates the current trace chunk of
the current tracing session. Once a rotation is completed, LTTng does
not manage the trace chunk archive anymore: you can read it, modify it,
move it, or remove it.

Because a rotation causes the tracing session’s current sub-buffers
to be flushed, trace chunk archives are never redundant, that is, they
do not overlap over time, unlike snapshots.

Once a rotation is complete, offline analyses can be performed on
the resulting trace, much like in 'normal' mode. However, the big
advantage is that this can be done without interrupting tracing, and
without being limited to tools which implement the "live" protocol.

Moreover, session rotations can be scheduled on a time or size
basis. The following commands give an idea of how this functionality
can be used:

$ lttng enable-rotation --timer 30s

A rotation schedule is set so that an automatic rotation occurs at
least every 30 seconds.

$ lttng enable-rotation --size 100M

A the rotation schedule is set so that an automatic rotation occurs
every time the total size of the flushed part of the current trace
chunk is at least 100 MiB.

Conversely, session rotation schedules can be deactivated using the
'lttng disable-rotation' command.

Finally, it is also possible to use the Notification API to notify
external tools when a rotation has been completed. This allows
arbitrary actions to be taken on a trace chunk archive when a scheduled
rotation is completed. Such actions can include compressing, analyzing,
or transferring a trace chunk, for example.


-- Dynamic tracing of user-space --

This release also marks the introduction of another feature we
have been eager to introduce for a long time: dynamic tracing.

As of this release, it is possible to dynamically instrument
function entries of applications and shared libraries, as well as
DTrace-style SDT probes.

The feature relies on the Linux kernel's uprobe facilities. As such,
the kernel tracer is needed to benefit from this functionality.

Here is an example instrumenting the libc's 'malloc' function
which will produce an event named 'libc_malloc' on every
invocation of malloc() by any application linked on libc:

$ lttng enable-event --kernel \
 --userspace-probe /usr/lib/libc-2.28.so:malloc \
 libc_malloc

SDT probes are tracepoints distributed in multiple libraries and
applications. This implementation supports tracing of SDT probes that
are NOT guarded by a semaphore.

The syntax to enable an SDT tracepoint userspace probe follows:

$ lttng enable-event --kernel \
 --userspace-probe=sdt:/path/to/executable:provider:probe

Note that, for the time being, no payload is extracted (function
arguments or SDT probe parameters).


-- User and kernel space call stack capture from the LTTng-modules kernel 
tracer --

Two new contexts have been introduced for kernel channels:
callstack-kernel and callstack-user.

This allows the sampling of both the kernel and user space call stacks
when a k