summaryrefslogtreecommitdiff
path: root/doc/lua-api
diff options
context:
space:
mode:
authorChristopher Faulet <cfaulet@haproxy.com>2022-02-01 18:53:53 +0100
committerChristopher Faulet <cfaulet@haproxy.com>2022-02-23 09:26:32 +0100
commit686501cb1c4eabd0ab1e91da70adf0bd322d3ccd (patch)
tree22b95968ba805a0e7134359d50c2ed3427fe53c0 /doc/lua-api
parent3d9266f414abef21f978a4723bf60519be6fa1f4 (diff)
downloadhaproxy-686501cb1c4eabd0ab1e91da70adf0bd322d3ccd.tar.gz
BUG/MEDIUM: stream: Abort processing if response buffer allocation fails
In process_stream(), we force the response buffer allocation before any processing to be able to return an error message. It is important because, when an error is triggered, the stream is immediately closed. Thus we cannot wait for the response buffer allocation. When the allocation fails, the stream analysis is stopped and the expiration date of the stream's task is updated before exiting process_stream(). But if the stream was woken up because of a connection or an analysis timeout, the expiration date remains blocked in the past. This means the stream is woken up in loop as long as the response buffer is not properly allocated. Alone, this behavior is already a bug. But because the mechanism to handle buffer allocation failures is totally broken since a while, this bug becomes more problematic. Because, most of time, the watchdog will kill HAProxy in this case because it will detect a spinning loop. To fix it, at least temporarily, an allocation failure at this stage is now reported as an error and the processing is aborted. It's not satisfying but it is better than nothing. If the buffers allocation mechanism is refactored, this part will be reviewed. This patch must be backported, probably as far as 2.0. It may be perceived as a regression, but the actual behavior is probably even worse. And because it was not reported, it is probably not a common situation.
Diffstat (limited to 'doc/lua-api')
0 files changed, 0 insertions, 0 deletions