Fix: event notification capture error handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Sep 2022 19:07:24 +0000 (15:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 28 Sep 2022 18:23:28 +0000 (14:23 -0400)
commit76db48089b6717136c4712db4e663011fcb4714b
treee8444770e1d99b41b254d3ed66c1e51d9cb9b4ed
parent18789896935a1a16a5be8ff6fd6279af206af27c
Fix: event notification capture error handling

When the captured fields end up taking more than 512 bytes of space for
the msgpack message, the notification append capture fails.

Currently, this is handled by printing a WARN_ON_ONCE() on the console,
and a printk "Error appending capture to notification" warning.

Considering that this kind of error is very much legitimate, spamming
the console with warnings is not the way we want to handle this.

Rather than print a warning on the console, reset the msgpack writer
position to skip the problematic captured field entirely when it is
erroneous.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I4c98dc85266dd7af5e11bbd3d73ab5118c9e03af
include/lttng/msgpack.h
src/lib/msgpack/msgpack.c
src/lttng-event-notifier-notification.c
This page took 0.026203 seconds and 4 git commands to generate.