Fix: stop sessiond threads on health thread error
[lttng-tools.git] / src / bin / lttng-relayd / stream.c
index b604919a78b376062cc52ed8a0a5b189d0be3143..9d2b4892207c32a59d526625cccd1077bffdc40b 100644 (file)
@@ -253,6 +253,11 @@ static void stream_unpublish(struct relay_stream *stream)
 static void stream_destroy(struct relay_stream *stream)
 {
        if (stream->indexes_ht) {
+               /*
+                * Calling lttng_ht_destroy in call_rcu worker thread so
+                * we don't hold the RCU read-side lock while calling
+                * it.
+                */
                lttng_ht_destroy(stream->indexes_ht);
        }
        if (stream->tfa) {
@@ -442,6 +447,10 @@ void print_relay_streams(void)
        struct lttng_ht_iter iter;
        struct relay_stream *stream;
 
+       if (!relay_streams_ht) {
+               return;
+       }
+
        rcu_read_lock();
        cds_lfht_for_each_entry(relay_streams_ht->ht, &iter.iter, stream,
                        node.node) {
This page took 0.023945 seconds and 4 git commands to generate.