X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer-timer.c;h=37c9861b906a0a81c6b08a302c73e486e6c6d3dd;hb=5e41ebe1bcc918cb5ff5d97489ccfbae0b7086a3;hp=a7f4536a25883cde8bec0aa8f4a3d9a13196e379;hpb=ec6ea7d01adc8a9d1481ba645b282c92ec27208e;p=lttng-tools.git diff --git a/src/common/consumer-timer.c b/src/common/consumer-timer.c index a7f4536a2..37c9861b9 100644 --- a/src/common/consumer-timer.c +++ b/src/common/consumer-timer.c @@ -84,15 +84,15 @@ static void metadata_switch_timer(struct lttng_consumer_local_data *ctx, * - Calling lttng_ustconsumer_recv_metadata(): * - 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; }