BUG/MEDIUM: spoe: Return an error when the wrong ACK is received in sync mode
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 25 May 2018 08:42:37 +0000 (10:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 May 2018 13:34:48 +0000 (15:34 +0200)
commit3a47e5e25c0e5621616b75ab0dd4a56c2f1d0608
tree7ea419de25e546d1eb989e848a864ff3fce89756
parent44e609bfa5bfd498fe5487ed9c53016e5052b827
BUG/MEDIUM: spoe: Return an error when the wrong ACK is received in sync mode

This is required to let a message processing timed out. Because, when it
happens, there is no more context attached to the SPOE applet that sent the
NOTIFY frame. So when the ACK is received, it is too late. This is the same
situation when we receive the wrong ACK. It is invalid in sync mode. Otherwise,
the SPOE applet remains in the state "WAITING_SYNC_ACK" until the idle timeout
is reached. In such case, the applet is seen as busy and it is unusable. If this
happens too often, more and more applets will be created because some others are
blocked. If there is a maxconn on the SPOE backend, all processings will be
drastically slowdown.

Returning an error in such cases, in sync mode, allow us to terminate the SPOE
applet. Because it means the agent is unresponsive or too slow.

Note this bug exists only if the sync mode is used.

This patch must be backported in 1.8.
src/flt_spoe.c