Fix: don't access packet header for stream_id and stream_instance_id getters stable-2.10-backport
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 10 Apr 2019 14:49:53 +0000 (10:49 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 10 Apr 2019 15:05:45 +0000 (11:05 -0400)
commit8974d65188ce4a24b0ef679b903f4c39c984d1ca
tree50a72d9254c931bee7152a7769f7d5b733f622d7
parenta94d430f2a5b3b7800e1b409f024ed5a213834db
Fix: don't access packet header for stream_id and stream_instance_id getters

The stream ID and stream instance ID are invariant for a stream, so
there is no point reading them from the packet header currently owned by
the consumer (between get/put subbuf).

Actually, the consumer try to access the stream_id from the live timer
when sending a live beacon without getting the reader subbuffer first,
which was handled by issuing a CHAN_WARN_ON, which disables tracing for
the channel, and prints warning to the consumerd console when running
consumerd with LTTNG_UST_DEBUG=1).

In the case where a ring buffer does not have any data ready, it makes
no sense to try to get a subbuffer for reading anyway, so the approach
was broken.

So return the stream id and stream instance id from the internal
data structures rather than reading it from the ring buffer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ring-buffer-client.h
This page took 0.024965 seconds and 5 git commands to generate.