Fix: sessiond: leak of trace chunk on destruction error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Oct 2019 22:53:47 +0000 (18:53 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Oct 2019 22:58:40 +0000 (18:58 -0400)
commit3156892b9633c1fbee3ace6cc2b013e678343083
treea41f3aa1c89ea707d338d67c685c4ca871db03cf
parentd186e4cbbca201936132f3b6aad1710e35dec373
Fix: sessiond: leak of trace chunk on destruction error

By design, a trace chunk can be leaked on the consumer daemon's end if
the session daemon does not close it. This is because the consumer
daemon has no "top-level" session object which could bound the
lifetime of a trace chunk.

It was reported that errors during a session destruction operation
could result in a trace chunk leak being reported by the consumer
daemon on shut down.

In the case that was reported, the failure to launch an application
caused the metadata channel to never be created. When the session was
destroyed, the rotation of the metadata channel failed with a "channel
does not exist" error. This error caused cmd_rotate_session() to abort
before the trace chunk close command was sent to the consumer
daemon(s). This ultimately results in the leak described earlier.

The fix consists in performing the trace chunk close command on the
consumer daemon even if the rotation itself fails.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c
This page took 0.027813 seconds and 5 git commands to generate.