projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: leak of consumer_output when using an explicit snapshot output
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ht-cleanup.c
diff --git
a/src/bin/lttng-sessiond/ht-cleanup.c
b/src/bin/lttng-sessiond/ht-cleanup.c
index 09c13fe003d7d40c5af423a5bf98634e853e0162..02244f0cafedf4aa44236d346fe3c658b7e368e6 100644
(file)
--- a/
src/bin/lttng-sessiond/ht-cleanup.c
+++ b/
src/bin/lttng-sessiond/ht-cleanup.c
@@
-128,6
+128,7
@@
static void *thread_ht_cleanup(void *data)
health_code_update();
while (1) {
health_code_update();
while (1) {
+ restart:
DBG3("[ht-thread] Polling.");
health_poll_entry();
ret = lttng_poll_wait(&events, -1);
DBG3("[ht-thread] Polling.");
health_poll_entry();
ret = lttng_poll_wait(&events, -1);
@@
-154,11
+155,6
@@
static void *thread_ht_cleanup(void *data)
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
- if (!revents) {
- /* No activity for this FD (poll implementation). */
- continue;
- }
-
if (pollfd != ht_cleanup_pipe[0]) {
continue;
}
if (pollfd != ht_cleanup_pipe[0]) {
continue;
}
@@
-181,6
+177,13
@@
static void *thread_ht_cleanup(void *data)
lttng_ht_destroy(ht);
health_code_update();
lttng_ht_destroy(ht);
health_code_update();
+
+ /*
+ * Ensure that we never process the quit pipe
+ * event while there is still data available
+ * on the ht clean pipe.
+ */
+ goto restart;
} else if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
ERR("ht cleanup pipe error");
goto error;
} else if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
ERR("ht cleanup pipe error");
goto error;
This page took
0.030603 seconds
and
4
git commands to generate.