From 255d7d27a67f1100d7583617945d558b14b01e85 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 18 Dec 2013 18:34:44 -0500 Subject: [PATCH] Fix: remove break in epoll loop of apps. thread In *heavy* stress test with a large number of applications (> 7000 a second), the manage application thread could starve the delete process by breaking just after adding an application to the poll set. Also, we've observed that somehow the application unregister process is not done on most of the application by breaking the loop at each delete from the poll set. We are still uncertain why but one theory is that epoll detects that an I/O operation is ready (here a shutdown) and an other subsystem of the session daemon uses that socket for I/O which flags the poll event as "has been taken care of" thus the loop never sees it because of that break. The notify socket thread does not use a break between poll operation which leads us to that conclusion with the manage apps thread. We don't use epoll with edge-trigger thus a POLLERR/POLLHUP should always be return as long as it's not taken care of. Acked-by: Mathieu Desnoyers Signed-off-by: David Goulet --- src/bin/lttng-sessiond/main.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index a81a9a83f..bdd48c24c 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1309,10 +1309,6 @@ static void *thread_manage_apps(void *data) } DBG("Apps with sock %d added to poll set", sock); - - health_code_update(); - - break; } } else { /* @@ -1328,7 +1324,6 @@ static void *thread_manage_apps(void *data) /* Socket closed on remote end. */ ust_app_unregister(pollfd); - break; } } -- 2.34.1