From 07559847d905fcf2a566ca1202c436eb72f4cc3f Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 19 Aug 2015 14:44:59 -0700 Subject: [PATCH] Fix: sessiond vs consumerd push/get metadata deadlock MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We need to unlock the registry while we push metadata to break a circular dependency between the consumerd metadata lock and the sessiond registry lock. Indeed, pushing metadata to the consumerd awaits that it gets pushed all the way to relayd, but doing so requires grabbing the metadata lock. If a concurrent metadata request is being performed by consumerd, this can try to grab the registry lock on the sessiond while holding the metadata lock on the consumer daemon. Those push and pull schemes are performed on two different bidirectionnal communication sockets. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- src/common/consumer-timer.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/consumer-timer.h b/src/common/consumer-timer.h index f877b8ffe..a9360027e 100644 --- a/src/common/consumer-timer.h +++ b/src/common/consumer-timer.h @@ -55,4 +55,7 @@ void consumer_signal_init(void); int consumer_flush_kernel_index(struct lttng_consumer_stream *stream); int consumer_flush_ust_index(struct lttng_consumer_stream *stream); +int consumer_flush_kernel_index(struct lttng_consumer_stream *stream); +int consumer_flush_ust_index(struct lttng_consumer_stream *stream); + #endif /* CONSUMER_TIMER_H */ -- 2.34.1