[lttng-dev] [PATCH lttng-tools 2/2] Fix: consumerd main: needs to be a registered RCU thread

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Jan 19 00:23:27 UTC 2017


main->lttng_consumer_destroy->destroy_data_stream_ht requires a RCU
read-side lock.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
 src/bin/lttng-consumerd/lttng-consumerd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c
index 7f78c4e..2f8eed1 100644
--- a/src/bin/lttng-consumerd/lttng-consumerd.c
+++ b/src/bin/lttng-consumerd/lttng-consumerd.c
@@ -308,6 +308,8 @@ int main(int argc, char **argv)
 	void *status;
 	struct lttng_consumer_local_data *tmp_ctx;
 
+	rcu_register_thread();
+
 	if (set_signal_handler()) {
 		retval = -1;
 		goto exit_set_signal_handler;
@@ -643,6 +645,8 @@ exit_health_consumerd_cleanup:
 exit_options:
 exit_set_signal_handler:
 
+	rcu_unregister_thread();
+
 	if (!retval) {
 		exit(EXIT_SUCCESS);
 	} else {
-- 
2.1.4



More information about the lttng-dev mailing list