From: Christopher Faulet Date: Tue, 14 Nov 2017 21:02:30 +0000 (+0100) Subject: BUG/MINOR: Allocate the log buffers before the proxies startup X-Git-Tag: v1.8-rc4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96d4483df75458614339879e359b72169fa6b760;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/haproxy.c b/src/haproxy.c index 5b45dfbaf6..deec51bf61 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().