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;