X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=4623579e809ac8d5cb8e59e93f6447077d24b875;hb=7a15c0ae9006ba4e0adeb55d78495b5610eaaec8;hp=83eb01673336fb8af82333677fcdd22998276314;hpb=9c62ab283193fbc3490a1b09e8aa2de02761c759;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 83eb01673..4623579e8 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -3081,6 +3081,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock, case LTTNG_LIST_EVENTS: case LTTNG_LIST_SYSCALLS: case LTTNG_LIST_TRACKER_PIDS: + case LTTNG_DATA_PENDING: break; default: /* Setup lttng message with no payload */ @@ -6227,6 +6228,13 @@ exit_init_data: rcu_thread_offline(); rcu_unregister_thread(); + /* + * Ensure all prior call_rcu are done. call_rcu callbacks may push + * hash tables to the ht_cleanup thread. Therefore, we ensure that + * the queue is empty before shutting down the clean-up thread. + */ + rcu_barrier(); + ret = notify_thread_pipe(ht_cleanup_quit_pipe[1]); if (ret < 0) { ERR("write error on ht_cleanup quit pipe"); @@ -6256,9 +6264,6 @@ exit_health_sessiond_cleanup: exit_create_run_as_worker_cleanup: exit_options: - /* Ensure all prior call_rcu are done. */ - rcu_barrier(); - sessiond_cleanup_options(); exit_set_signal_handler: