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:16:40 +0000 (21:16 -0500)
commit57ebc611b4d48d538e5cccdf2a723681f799cb89
tree0ea2033d339965f9be3eb11403fa9616ab881aab
parent85d1d2791f3cebfd741a821261bf2924928a90e7
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.025016 seconds and 4 git commands to generate.