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>
Thu, 17 Oct 2019 15:16:36 +0000 (11:16 -0400)
commit8712cbfc306d0ea0f25a94af2720f163d1803c29
tree72643ac47f1b30ed49b184c663fa2400b1b38ea7
parent5d86f201ff8ae68d28c230a37ba0bbbc2c3eab52
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.025057 seconds and 4 git commands to generate.