mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 06:11:32 +01:00
In issue #1197, Stéphane Graber reported a rare case of crash that results from an attempt to close an already closed H1 connection. It indeed looks like under some circumstances it should be possible to call the h1_shutw_conn() function more than once, though these conditions are not very clear. Without going through a deep analysis of all possibilities, one potential case seems to be a detach() called with pending output data, causing H1C_F_ST_SHUTDOWN to be set on the connection, then h1_process() being immediately called on I/O, causing h1_send() to flush these data and call h1_shutw_conn(), and finally the upper stream calling cs_shutw() hence h1_shutw(), which itself will call h1_shutw_conn() again while the transport and control layers have already been released. But the whole sequence is not certain as it's not very clear in which case it's possible to leave h1_send() without the connection anymore (at least the obuf is empty). However what is certain is that a shutdown function must be idempotent, so let's fix h1_shutw_conn() regarding this point. Stéphane reported the issue as far back as 2.0, so this patch should be backported this far.
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%
Shell
0.9%
Makefile
0.5%
Lua
0.2%
Python
0.2%