mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-07 18:51:21 +01:00
There is an issue with some medium sized transfers occasionally not shutting down at the end. Olivier tracked this to being caused by a missing wakeup of process_stream(). What happens is that one of the analysers sets CF_WAKE_WRITE to be woken up at the end of the transfer to take note of the end of transaction, but a failed si_cs_send() at the end of process_stream causes the call to be attempted again, with CF_WAKE_WRITE lost. Then stream_int_notify() doesn't find any valid condition to wake up process_stream(), and the stream stays there, idling till the timeout. In fact, CF_WAKE_WRITE has been designed for calling the analysers to complete an operation without closing (keep-alive HTTP transfer for instance). It only applies once the buffer is empty and there is nothing left to be forwarded. In case the channel is closed, the wakeup is already granted. So what we need here is to make sure to wake process_stream() up in case the channel will not be closed and it doesn't have anything left to be transferred. This is detected by the lack of CF_AUTO_CLOSE and the emptiness of the buffer + to_forward after a write activity. So now we take care of always waking the stream up on end of transfers even if the analysers didn't subscribe to this or if their subscription was lost. CF_WAKE_WRITE should probably be killed now, though this first requires careful inspection. No backport is needed. Cc: Olivier Houchard <ohouchard@haproxy.com> Cc: Christopher Faulet <cfaulet@haproxy.com>
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 - 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%
Shell
0.9%
Makefile
0.5%
Lua
0.2%
Python
0.2%