Fix: get_subbuf: bound number of consumerd retry
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Jan 2015 02:06:19 +0000 (21:06 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Jan 2015 02:15:42 +0000 (21:15 -0500)
commitdddba3983889d49dd1ee7fbb5b44b9530c1778d8
tree013276e2f808b5c44de15184adba8eb0c1bae278
parent30b4246ff8a820cf561c7b1b4079669bb79e917b
Fix: get_subbuf: bound number of consumerd retry

When an application traced with per-UID buffers vanishes between its
reserve and commit ring buffer operations (e.g. segfault), it may cause
the consumer daemon to enter an endless loop, awaiting for the
application to complete its commit.

Fix this situation by bounding the number of retry using an adaptative
approach: try actively for a few times, and then try a few more times
with a 10ms delay between attempts.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/ring_buffer_frontend.c
This page took 0.025224 seconds and 4 git commands to generate.