- Add new MEDIUM+ patches (see https://www.haproxy.org/bugs/bugs-1.8.4.html) - Raise patch-level to 02 Signed-off-by: Christian Lachner <gladiac@gmail.com>
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From 7034083b5063d28276b986d645d18071aba5f4d5 Mon Sep 17 00:00:00 2001
|
|
From: Christopher Faulet <cfaulet@haproxy.com>
|
|
Date: Wed, 28 Feb 2018 13:33:26 +0100
|
|
Subject: [PATCH] BUG/MEDIUM: spoe: Remove idle applets from idle list when
|
|
HAProxy is stopping
|
|
|
|
In the SPOE applet's handler, when an applet is switched from the state IDLE to
|
|
PROCESSING, it is removed for the list of idle applets. But when HAProxy is
|
|
stopping, this applet can be switched to DISCONNECT. In this case, we also need
|
|
to remove it from the list of idle applets. Else the applet is removed but still
|
|
present in the list. It could lead to a segmentation fault or an infinite loop,
|
|
depending the code path.
|
|
|
|
(cherry picked from commit 7d9f1ba246055046eed547fa35aa546683021dce)
|
|
[wt: adapted context for 1.8]
|
|
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
|
---
|
|
src/flt_spoe.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
|
|
index 8fb6e0b..e76a352 100644
|
|
--- a/src/flt_spoe.c
|
|
+++ b/src/flt_spoe.c
|
|
@@ -1866,6 +1866,7 @@ spoe_handle_appctx(struct appctx *appctx)
|
|
goto switchstate;
|
|
|
|
case SPOE_APPCTX_ST_IDLE:
|
|
+ agent->rt[tid].applets_idle--;
|
|
if (stopping &&
|
|
LIST_ISEMPTY(&agent->rt[tid].sending_queue) &&
|
|
LIST_ISEMPTY(&SPOE_APPCTX(appctx)->waiting_queue)) {
|
|
@@ -1874,7 +1875,6 @@ spoe_handle_appctx(struct appctx *appctx)
|
|
appctx->st0 = SPOE_APPCTX_ST_DISCONNECT;
|
|
goto switchstate;
|
|
}
|
|
- agent->rt[tid].applets_idle--;
|
|
appctx->st0 = SPOE_APPCTX_ST_PROCESSING;
|
|
/* fall through */
|
|
|
|
--
|
|
1.7.10.4
|
|
|