X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer-timer.c;h=a7f4536a25883cde8bec0aa8f4a3d9a13196e379;hb=ace17efaf90b672f303b22959146c01793e9d4b2;hp=f2dff4cd980aae5258cfc19a3c268bd800c955c8;hpb=d98a47c754f867bee113325ff69419f0829de0bb;p=lttng-tools.git diff --git a/src/common/consumer-timer.c b/src/common/consumer-timer.c index f2dff4cd9..a7f4536a2 100644 --- a/src/common/consumer-timer.c +++ b/src/common/consumer-timer.c @@ -78,6 +78,20 @@ 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(): + * - 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;