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:43 +0000 (21:16 -0500)
commit295097ea1074019c494918a976d76feef44e59c9
treeba66b7d9b086bb4fdb2b816695d53b0a11fb51ca
parent46dba5ef6aa339f476a7c630818696ccf5f4574f
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.024244 seconds and 4 git commands to generate.