BUG/MEDIUM: proxy: use thread-safe stream killing on hard-stop
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Feb 2021 10:08:56 +0000 (11:08 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Feb 2021 15:54:29 +0000 (16:54 +0100)
commite287b480ba59f92c2757a7cfcef1f7a86c337ca0
tree8507811129305286e3d03f0e89f6b7a1ef5a2d27
parentdd8b4da9e1bd908111a2829d5aadec338d345865
BUG/MEDIUM: proxy: use thread-safe stream killing on hard-stop

When setting hard-stop-after, hard_stop() is called at the end to kill
last pending streams. Unfortunately there's no locking there while
walking over the streams list nor when shutting them down, so it's
very likely that some old processes have been crashing or gone wild
due to this. Let's use a thread_isolate() call for this as we don't
have much other choice (and it happens once in the process' life,
that's OK).

This must be backported to 1.8.

(cherry picked from commit 92b887e20a995323d3fbd42d2be035733cefd6ba)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit be9833e3248c84d3a911c215125975003c29d688)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit df925ed60b5debbd3a9895b214b4984f8e72587f)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/proxy.c