X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer-timer.c;h=37c9861b906a0a81c6b08a302c73e486e6c6d3dd;hp=a32dbf64d2d229e730f6e87a4add490c75567a39;hb=a1ae300ff3a139f4d4f593eddf444b0fca52280f;hpb=4fa3dc0ebca381a211ace01c3320591529b5b833 diff --git a/src/common/consumer-timer.c b/src/common/consumer-timer.c index a32dbf64d..37c9861b9 100644 --- a/src/common/consumer-timer.c +++ b/src/common/consumer-timer.c @@ -82,19 +82,17 @@ static void metadata_switch_timer(struct lttng_consumer_local_data *ctx, * Locks taken by lttng_ustconsumer_request_metadata(): * - metadata_socket_lock * - Calling lttng_ustconsumer_recv_metadata(): - * - consumer_data.lock - * - channel->lock - * - channel->metadata_cache->lock + * - channel->metadata_cache->lock * - Calling consumer_metadata_cache_flushed(): - * - consumer_data.lock - * - channel->lock - * - channel->metadata_cache->lock + * - channel->timer_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. + * Ensure that neither consumer_data.lock nor + * channel->lock are taken within this function, since + * they are held while consumer_timer_switch_stop() is + * called. */ - ret = lttng_ustconsumer_request_metadata(ctx, channel); + ret = lttng_ustconsumer_request_metadata(ctx, channel, 1); if (ret < 0) { channel->switch_timer_error = 1; }