X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Flive.c;h=80c3da57ac63d2ee0fd69b5942e063c7aefa4f16;hb=11cfa3b789ad0da03b6f764e69110f337f251fc5;hp=bfa7b85259ad7d3d2a75fdba5dfb416feccfe13c;hpb=3557d45682bd899f3355b61cb5db8c8d0355f486;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index bfa7b8525..80c3da57a 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -57,6 +57,7 @@ #include "lttng-viewer.h" #include "utils.h" #include "health-relayd.h" +#include "testpoint.h" static struct lttng_uri *live_uri; @@ -253,6 +254,10 @@ void *thread_listener(void *data) lttng_relay_notify_ready(); + if (testpoint(relayd_thread_live_listener)) { + goto error_testpoint; + } + while (1) { health_code_update(); @@ -340,6 +345,7 @@ restart: exit: error: error_poll_add: +error_testpoint: lttng_poll_clean(&events); error_create_poll: if (live_control_sock->fd >= 0) { @@ -375,6 +381,10 @@ void *thread_dispatcher(void *data) health_register(health_relayd, HEALTH_RELAYD_TYPE_LIVE_DISPATCHER); + if (testpoint(relayd_thread_live_dispatcher)) { + goto error_testpoint; + } + health_code_update(); while (!CMM_LOAD_SHARED(live_dispatch_thread_exit)) { @@ -423,6 +433,7 @@ void *thread_dispatcher(void *data) err = 0; error: +error_testpoint: if (err) { health_error(); ERR("Health error occurred in %s", __func__); @@ -1825,6 +1836,10 @@ void *thread_worker(void *data) health_register(health_relayd, HEALTH_RELAYD_TYPE_LIVE_WORKER); + if (testpoint(relayd_thread_live_worker)) { + goto error_testpoint; + } + /* table of connections indexed on socket */ relay_connections_ht = lttng_ht_new(0, LTTNG_HT_TYPE_ULONG); if (!relay_connections_ht) { @@ -1980,6 +1995,7 @@ relay_connections_ht_error: DBG("Viewer worker thread exited with error"); } DBG("Viewer worker thread cleanup complete"); +error_testpoint: if (err) { health_error(); ERR("Health error occurred in %s", __func__);