haproxy public development tree
Go to file
Amaury Denoyelle 3f07c20fab BUG/MEDIUM: session: only retrieve ready idle conn from session
A bug was introduced by the early insertion of idle connections at the
end of connect_server. It is possible to reuse a connection not yet
ready waiting for an handshake (for example with proxy protocol or ssl).
A wrong duplicate xprt_handshake_io_cb tasklet is thus registered as a
side-effect.

This triggers the BUG_ON statement of xprt_handshake_subscribe :
    BUG_ON(ctx->subs && ctx->subs != es);

To counter this, a check is now present in session_get_conn to only
return a connection without the flag CO_FL_WAIT_XPRT. This might cause
sometimes the creation of dedicated server connections when in theory
reuse could have been used, but probably only occurs rarely in real
condition.

This behavior is present since commit :
    MEDIUM: connection: Add private connections synchronously in session server list
It could also be further exagerated by :
    MEDIUM: backend: add reused conn to sess if mux marked as HOL blocking

It can be backported up to 2.3.

NOTE : This bug seems to be only reproducible with mode tcp, for an
unknown reason. However, reuse should never happen when not in http
mode. This improper behavior will be the subject of a dedicated patch.

This bug can easily be reproducible with the following config (a
webserver is required to accept proxy protocol on port 31080) :

    global

    defaults
      mode tcp
      timeout connect 1s
      timeout server 1s
      timeout client 1s

    listen li
      bind 0.0.0.0:4444
      server bla1 127.0.0.1:31080 check send-proxy-v2

with the inject client :
    $ inject -u 10000 -d 10 -G 127.0.0.1:4444

This should fix the github issue #1058.
2021-01-28 14:16:27 +01:00
.github CI: Fix DEBUG_STRICT definition for Coverity 2021-01-27 12:45:07 +01:00
contrib MINOR: contrib/prometheus-exporter: use fill_sv_stats for server dump 2021-01-26 09:24:57 +01:00
doc DOC: Improve documentation of the various hdr() fetches 2021-01-26 09:22:43 +01:00
examples
include BUG/MEDIUM: session: only retrieve ready idle conn from session 2021-01-28 14:16:27 +01:00
reg-tests MEDIUM: ssl: Enable backend certificate hot update 2021-01-26 15:19:36 +01:00
scripts BUG/MINOR: reg-tests: fix service dependency script 2021-01-11 14:16:06 +01:00
src BUG/MINOR: ssl: init tmp chunk correctly in ssl_sock_load_sctl_from_file() 2021-01-27 14:58:51 +01:00
tests MEDIUM: config: remove the deprecated and dangerous global "debug" directive 2020-10-09 19:18:45 +02:00
.cirrus.yml CI: cirrus: drop CentOS 6 builds 2020-12-16 09:21:51 +01:00
.gitattributes MINOR: Commit .gitattributes 2020-09-05 16:21:59 +02:00
.gitignore CLEANUP: Update .gitignore 2020-09-12 13:11:24 +02:00
.travis.yml CI: travis-ci: drop coverity scan builds 2020-12-22 19:39:23 +01:00
BRANCHES DOC: fix some spelling issues over multiple files 2021-01-08 14:53:47 +01:00
CHANGELOG [RELEASE] Released version 2.4-dev6 2021-01-22 16:19:46 +01:00
CONTRIBUTING DOC: fix some spelling issues over multiple files 2021-01-08 14:53:47 +01:00
INSTALL DOC: fix some spelling issues over multiple files 2021-01-08 14:53:47 +01:00
LICENSE
MAINTAINERS DOC: Add maintainers for the Prometheus exporter 2021-01-08 15:14:15 +01:00
Makefile MINOR: build: discard echoing in help target 2021-01-18 08:58:33 +01:00
README
ROADMAP
SUBVERS
VERDATE [RELEASE] Released version 2.4-dev6 2021-01-22 16:19:46 +01:00
VERSION [RELEASE] Released version 2.4-dev6 2021-01-22 16:19:46 +01:00

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)