From 96d4483df75458614339879e359b72169fa6b760 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 14 Nov 2017 22:02:30 +0100 Subject: [PATCH] BUG/MINOR: Allocate the log buffers before the proxies startup Since the commit cd7879adc ("BUG/MEDIUM: threads: Run the poll loop on the main thread too"), the log buffers are allocated after the proxies startup. So log messages produced during this startup was ignored. To fix the bug, we restore the initialization of these buffers before proxies startup. This is specific to threads, no backport is needed. --- src/haproxy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index 5b45dfbaf..deec51bf6 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1796,6 +1796,11 @@ static void init(int argc, char **argv) exit(1); } + if (!init_log_buffers()) { + Alert("failed to initialize log buffers.\n"); + exit(1); + } + /* * Note: we could register external pollers here. * Built-in pollers have been registered before main().