BUG/MEDIUM: stream: Keep FLT_END analyzers if a stream detects a channel error
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Oct 2021 13:06:20 +0000 (15:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 Oct 2021 13:55:44 +0000 (15:55 +0200)
commit183780a60e3f3197260d3c9143ffaa09b1df2c39
treefb3af39d3d613163ce422fe213ae0b8cd4f85e65
parenta9ebab6e22c1e90d8584b6cd6bc5c1a206db02a2
BUG/MEDIUM: stream: Keep FLT_END analyzers if a stream detects a channel error

If a channel error (READ_ERRO|READ_TIMEOUT|WRITE_ERROR|WRITE_TIMEOUT) is
detected by the stream, in process_stream(), FLT_END analyers must be
preserved. It is important to be sure to ends filter analysis and be able to
release the stream.

First, filters may release some ressources when FLT_END analyzers are
called. Then, the CF_FL_ANALYZE flag is used to sync end of analysis for the
request and the response. If FLT_END analyzer is ignored on a channel, this
may block the other side and freeze the stream.

This patch must be backported to all stable versions

(cherry picked from commit 813f913444726eafbc06050ce1d1623f5d84bc38)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit c94f727ea1a38656d93097bee551ab1375c8fe6d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/stream.c