mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-16 12:23:15 -04:00
HAProxy - Load balancer
When rcv_buf stream callback is invoked, mux tasklet is woken up if demux was previously blocked due to lack of buffer space. A BUG_ON() is present to ensure there is data in qcs Rx buffer. If this is not the case, wakeup is unneeded : BUG_ON(!ncb_data(&qcs->rx.ncbuf, 0)); This BUG_ON() may be triggered if RESET_STREAM is received after demux has been blocked. On reset, Rx buffer is purged according to RFC 9000 which allows to discard any data not yet consumed. This will trigger the BUG_ON() assertion if rcv_buf stream callback is invoked after this. To prevent BUG_ON() crash, just clear demux block flag each time Rx buffer is purged. This covers accordingly RESET_STREAM reception. This should be backported up to 2.7. This may fix github issue #2293. This bug relies on several precondition so its occurence is rare. This was reproduced by using a custom client which post big enough data to fill the buffer. It then emits a RESET_STREAM in place of a proper FIN. Moreover, mux code has been edited to artificially stalled stream read to force demux blocking. h3_data_to_htx: - return htx_sent; + return 1; qcc_recv_reset_stream: qcs_free_ncbuf(qcs, &qcs->rx.ncbuf); + qcs_notify_recv(qcs); qmux_strm_rcv_buf: char fin = 0; + static int i = 0; + if (++i < 2) + return 0; TRACE_ENTER(QMUX_EV_STRM_RECV, qcc->conn, qcs); |
||
|---|---|---|
| .github | ||
| addons | ||
| admin | ||
| dev | ||
| doc | ||
| examples | ||
| include | ||
| reg-tests | ||
| scripts | ||
| src | ||
| tests | ||
| .cirrus.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .travis.yml | ||
| BRANCHES | ||
| BSDmakefile | ||
| CHANGELOG | ||
| CONTRIBUTING | ||
| INSTALL | ||
| LICENSE | ||
| MAINTAINERS | ||
| Makefile | ||
| README | ||
| SUBVERS | ||
| VERDATE | ||
| VERSION | ||
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)