From: David Goulet Date: Mon, 4 Nov 2013 18:19:06 +0000 (-0500) Subject: Fix: arguments in the wrong order for fd-limit X-Git-Tag: v2.2.5~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=caa259718045b322d161773d3f531be8a4c5322c;p=lttng-tools.git Fix: arguments in the wrong order for fd-limit This is related to a bug we've been seeing with a very HIGH load of applications registering at the same time where the get/put counters get out of sync. exhausting the fd pool quite rapidely even though there was no fd leak. Acked-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 95e17fd40..3b45c339b 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1535,7 +1535,7 @@ static void *thread_dispatch_ust_registration(void *data) if (ret < 0) { PERROR("close ust sock dispatch %d", ust_cmd->sock); } - lttng_fd_put(1, LTTNG_FD_APPS); + lttng_fd_put(LTTNG_FD_APPS, 1); free(ust_cmd); goto error; } @@ -1549,7 +1549,7 @@ static void *thread_dispatch_ust_registration(void *data) if (ret < 0) { PERROR("close ust sock dispatch %d", ust_cmd->sock); } - lttng_fd_put(1, LTTNG_FD_APPS); + lttng_fd_put(LTTNG_FD_APPS, 1); free(wait_node); free(ust_cmd); continue; @@ -1597,7 +1597,7 @@ static void *thread_dispatch_ust_registration(void *data) if (ret < 0) { PERROR("close ust sock dispatch %d", ust_cmd->sock); } - lttng_fd_put(1, LTTNG_FD_APPS); + lttng_fd_put(LTTNG_FD_APPS, 1); } free(ust_cmd); }