From: Willy Tarreau Date: Tue, 24 Nov 2026 14:22:06 +0000 (+0100) Subject: BUG/MINOR: startup: also disable strict limits with -d X-Git-Url: https://git.kaiwu.me/http/$%7BGITURL%7D$%7Bcid%7D?a=commitdiff_plain;h=9a5483311c43fdb1fe4e9ed30ef96fe563e0ac5d;p=haproxy.git BUG/MINOR: startup: also disable strict limits with -d With commit 62c0c84b81 ("MINOR: init: automatically turn "set-dumpable" on when using "-d""), an interesting issue arrived: if started as an unprivileged user with ulimit -c forced to zero, then an error is reported saying it's not possible to raise the limit, and the process fails to start. This is ridiculous but logical and can easily be dealt with because this only happens when the strict-limits are set. Let's have -d also turn the strict limits off. No backport is needed. --- diff --git a/src/haproxy.c b/src/haproxy.c index 00adee27c..213f438dd 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1888,9 +1888,13 @@ static void init_args(int argc, char **argv) haproxy_init_args(argc, argv); - /* always enable dumpable mode in debug mode (-d) */ - if (arg_mode & MODE_DEBUG) + /* always enable dumpable mode in debug mode (-d), but do not fail on + * limits. + */ + if (arg_mode & MODE_DEBUG) { global.tune.options |= GTUNE_SET_DUMPABLE; + global.tune.options &= ~GTUNE_STRICT_LIMITS; + } } /* call the various keyword dump functions based on the comma-delimited list of