Fix: invalid discarded events on start/stop without event production
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 17 Jun 2020 19:55:36 +0000 (15:55 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 25 Jun 2020 17:09:03 +0000 (13:09 -0400)
commit518b286638451a51c543388ad0ad7fb2b0ace1f7
treed8b08b1c7e5a2a411990e8a90c284c2dc9475877
parent3910d1eac65d9b89d2b9e5bc2a07f6bdca9c088a
Fix: invalid discarded events on start/stop without event production

Observed issue
==============

On consecutive start/stop command sequence the reported discarded event
count is N * CPU, where N is the number of start/stop pair executed.

Note that no event generation occurred between each start/stop pair.

    lttng start
    lttng stop
    Tracing stopped for session auto-20200616-094338
    lttng start
    lttng stop
    Waiting for data availability
    Warning: 4 events were discarded, please refer to the documentation on channel configuration.
    Tracing stopped for session auto-20200616-094338
    lttng start
    lttng stop
    Waiting for data availability
    Warning: 8 events were discarded, please refer to the documentation on channel configuration.
    Tracing stopped for session auto-20200616-094338

The issue was bisected down to:
  commit 6f9449c22eef59294cf1e1dc3610a5cbf14baec0 (HEAD)
  Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  Date:   Sun May 10 18:00:26 2020 -0400

  consumerd: refactor: split read_subbuf into sub-operations
  [...]

Cause
=====

The discarded event local variable, in `consumer_stream_update_stats()`
is initialized with the subbuffer sequence count instead of the
subbuffer discarded event count.

Solution
========

Use the subbuffer discarded event count to initialized the variable.

Known drawbacks
=========

None

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I5ff213d0464cdb591b550f6e610bf15085b18888
src/common/consumer/consumer-stream.c
This page took 0.027096 seconds and 5 git commands to generate.