document metadata_switch_timer() deadlock
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Jul 2013 01:15:05 +0000 (21:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Jul 2013 18:33:30 +0000 (14:33 -0400)
Reviewed-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/consumer-timer.c

index f2dff4cd980aae5258cfc19a3c268bd800c955c8..a32dbf64d2d229e730f6e87a4add490c75567a39 100644 (file)
@@ -78,6 +78,22 @@ static void metadata_switch_timer(struct lttng_consumer_local_data *ctx,
        switch (ctx->type) {
        case LTTNG_CONSUMER32_UST:
        case LTTNG_CONSUMER64_UST:
+               /*
+                * Locks taken by lttng_ustconsumer_request_metadata():
+                * - metadata_socket_lock
+                *   - Calling lttng_ustconsumer_recv_metadata():
+                *     - consumer_data.lock
+                *       - channel->lock
+                *         - channel->metadata_cache->lock
+                *     - Calling consumer_metadata_cache_flushed():
+                *       - consumer_data.lock
+                *         - channel->lock
+                *           - channel->metadata_cache->lock
+                *
+                * Both consumer_data.lock and channel->lock currently
+                * cause a deadlock, since they are held while
+                * consumer_timer_switch_stop() is called.
+                */
                ret = lttng_ustconsumer_request_metadata(ctx, channel);
                if (ret < 0) {
                        channel->switch_timer_error = 1;
This page took 0.025962 seconds and 4 git commands to generate.