X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=40670ddd52a5c150053e0ae0fe60ca6f1b252184;hp=2752e9ff37be7f142a76eebd902a51a530c14217;hb=4d62fbf82e90a66f7196331bf515f58e63801d35;hpb=3a6922c6ab7b4d9455f517ac0bf86dfcede0ef3d diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 2752e9ff3..40670ddd5 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -4325,7 +4325,7 @@ error: } lttng_poll_clean(&events); - + stop_threads(); rcu_unregister_thread(); return NULL; } @@ -6147,6 +6147,12 @@ exit_client: exit_health: exit_init_data: + /* + * Wait for all pending call_rcu work to complete before tearing + * down data structures. call_rcu worker may be trying to + * perform lookups in those structures. + */ + rcu_barrier(); /* * sessiond_cleanup() is called when no other thread is running, except * the ht_cleanup thread, which is needed to destroy the hash tables.