Fix: sessiond: snapshot errors don't clear session's trace chunk
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 3 Feb 2020 22:33:28 +0000 (17:33 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 5 Feb 2020 20:57:08 +0000 (15:57 -0500)
commit836c7d541d9647b8ee00469fbd667b1a04916d30
tree6a707539ed587d03cfc07a524a4d4daf86cf80b4
parent76a95f15afd7b1abddf714e2e6431a8bfa46fc15
Fix: sessiond: snapshot errors don't clear session's trace chunk

The snapshot record command is implemented by creating and setting
a new trace chunk on the target session, capturing the snapshot, and
closing the session's trace chunk once it is complete.

On some error paths, the session's newly created trace chunk is not
cleared. This means that the session is seen to have a
'current_trace_chunk' on the next attempt to record a snapshot; an
unexpected condition for which an assert() exists.

This results in the following crash:
lttng-sessiond: /home/smarchi/src/lttng-tools/src/bin/lttng-sessiond/cmd.c:4685: snapshot_record: Assertion `!session->current_trace_chunk' failed.

Ensure that the session's current trace chunk is closed and cleared
when an error occurs during the command's execution.

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