mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
In sc_need_room(), we compute the maximum room that can be requested to restarted reading to be sure to be able to unblock the SC. At worst when the buffer is emptied. Here, the buffer reserve is considered but it is an issue. Counting the reserve can lead to a wicked bug with the H1 multiplexer, when small amount of data are found at the end of the HTX buffer. In this case, to not wrap, the H1 mux requests more room. It is an optim to be able to resync the buffer with the consumer side and to be able to perform zero-copy transfers. However, if this amount of data is smaller than the reserve and if the consumer is congested, we fall in a loop because the wrong value is used to request more room. The H1 mux continues to pretend there is not enough space in the buffer, while the effective requested value is lower than the free space in the buffer. While the consumer is congested and does not consume these data, the is no way to stop the loop. We can fix the function by removing the buffer reserve from the computation. But it remains a dangerous decision to apply a max value on room_needed. It is safer to require the caller must set a correct value. For now, it is true. But at the end, it is totally unexepected to wait for more room than an empty buffer can contain. This patch must be backported to 2.8.
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
C
98.1%
Shell
0.8%
Makefile
0.5%
Lua
0.2%
Python
0.2%