mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-25 15:51:24 +02:00
In connect_server(), we can enter in a stupid situation: - conn_install_mux_be() is called to install the mux. This one subscribes for receiving and quits ; - then we discover that a handshake is required on the connection (e.g. send-proxy), so xprt_add_hs() is called and subscribes as well. - we crash in conn_subscribe() which gets a different subscriber. And if BUG_ON is disabled, we'd likely lose one event. Note that it doesn't seem to happen by default, but definitely does if connect() rightfully performs fd_cant_recv(), so it's a matter of who does what and in what order. A simple reproducer consists in adding fd_cant_recv() after fd_cant_send() in tcp_connect_server() and running it on this config, as discussed in issue listen foo bind :8181 mode http server srv1 127.0.0.1:8888 send-proxy-v2 The root cause is that xprt_add_hs() installs an xprt layer underneath the mux without taking over its subscriptions. Ideally if we want to support this, we'd need to steal the connection's wait_events and replace them by new ones. But there doesn't seem to be any case where we're interested in doing this so better simply always install the transport layer before installing the mux, that's safer and simpler. This needs to be backported to 2.1 which is constructed the same way and thus suffers from the same issue, though the code is slightly different there.
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%