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.
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
Shell
100%