]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stream: Fix a possible freeze during a forced shut on a stream
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Mar 2025 13:49:45 +0000 (14:49 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 3 Apr 2025 08:19:57 +0000 (10:19 +0200)
commit51611a5b702e6dbf2e5ac56cbcef211326414282
treedaf7d5fe1c42d252d729cac63c344269e23191e7
parentb351f06ff119cfcbc157ccb61d2ee344becf6d6f
BUG/MEDIUM: stream: Fix a possible freeze during a forced shut on a stream

When a forced shutdown is performed on a stream, it is possible to freeze it
infinitly because it is performed in an unexpected way from process_stream()
point of view, especially when the stream is waiting for a server
connection. The events sequence is a bit complex but at the end the stream
remains blocked in turn-around state and no event are trriggered to unblock
it.

By trying to fix the issue, we considered it was safer to rethink the
feature. The idea is to quickly shutdown a stream to release resources. For
instance to be able to delete a server. So, instead of scheduling a
shutdown, it is more efficient to trigger an error and detach the stream
from the server, if neecessary. The same code than the one used to deal with
connection errors in back_handle_st_cer() is used.

This patch must be slowly backported as far as 2.6.
src/stream.c