]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: master/cli: Properly pin the master CLI on thread 1 / group 1
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Nov 2023 20:50:21 +0000 (21:50 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 29 Nov 2023 07:59:27 +0000 (08:59 +0100)
A previous fix was pushed for that (13fb7170be "BUG/MEDIUM: master/cli: Pin
the master CLI on the first thread of the group 1" ). Unfortunately, instead
of the master CLI, it is the sockpairs between the master and the workers
that were pinned to the first thread of the group 1. So the crash is still
there.

So, again, to fix the bug the master CLI is now pinned on the first thread
of the first group.

 patch should fix the issue #2259 and must be backported to 2.8.

src/cli.c

index 98e261e08214ce344c47d527a502c6776203782d..efc55bc75251ec8d37de98045727c7447f39dcc2 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -3229,6 +3229,9 @@ struct bind_conf *mworker_cli_proxy_new_listener(char *line)
        bind_conf->nice = -64;  /* we want to boost priority for local stats */
        bind_conf->options |= BC_O_UNLIMITED; /* don't make the peers subject to global limits */
 
+       /* Pin master CLI on the first thread of the first group only */
+       thread_set_pin_grp1(&bind_conf->thread_set, 1);
+
        list_for_each_entry(l, &bind_conf->listeners, by_bind) {
                l->rx.flags |= RX_F_MWORKER; /* we are keeping this FD in the master */
                global.maxsock++; /* for the listening socket */