Fix relayd: initialize beacon to -1ULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 24 Apr 2019 22:56:05 +0000 (18:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 24 Apr 2019 23:30:47 +0000 (19:30 -0400)
commitf7e6df039cbec4e735e74f42851e817914d79b65
tree162c871e0dce41909558282c70d32b2acd30b895
parent5b7446a7fdc4c8198566a28496cfa924d302bff1
Fix relayd: initialize beacon to -1ULL

The relayd stream beacon_ts_end field is expected to have the value
-1ULL when unset (no beacon has been received since last index).

However, the initial state is wrong. It is left at the value 0, which
indicates that a live beacon has indeed been received (which is untrue),
which in turn causes a live beacon with ctf_stream_id of -1ULL to be
sent to babeltrace, which does not expect it, and fails.

This issue can be triggered with the following scenario:

1) create live session
2) setup UST per-uid buffers tracing
3) start tracing, without any active traced application
4) hook with babeltrace live client to view the trace
5) run a traced application

Step 5) will cause the babeltrace live client to receive a stream_id of
-1ULL, and error out.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/stream.c
This page took 0.025625 seconds and 4 git commands to generate.