haproxy public development tree
Go to file
Olivier Houchard 1ad1991721 BUG/MAJOR: ssl_sock: Always clear retry flags in read/write functions
It has been found that under some rare error circumstances,
SSL_do_handshake() could return with SSL_ERROR_WANT_READ without
even trying to call the read function, causing permanent wakeups
that prevent the process from sleeping.

It was established that this only happens if the retry flags are
not systematically cleared in both directions upon any I/O attempt,
but, given the lack of documentation on this topic, it is hard to
say if this rather strange behavior is expected or not, otherwise
why wouldn't the library always clear the flags by itself before
proceeding?

In addition, this only seems to affect OpenSSL 1.1.0 and above,
and does not affect wolfSSL nor aws-lc.

A bisection on haproxy showed that this issue was first triggered by
commit a8955d57ed ("MEDIUM: ssl: provide our own BIO."), which means
that OpenSSL's socket BIO does not have this problem. And this one
does always clear the flags before proceeding. So let's just proceed
the same way. It was verified that it properly fixes the problem,
does not affect other implementations, and doesn't cause any freeze
nor spurious wakeups either.

Many thanks to Valentín Gutiérrez for providing a network capture
showing the incident as well as a reproducer. This is GH issue #2403.

This patch needs to be backported to all versions that include the
commit above, i.e. as far as 2.0.
2024-01-29 15:10:24 +01:00
.github Revert "CI: enable spell check on git push" 2024-01-26 19:58:14 +01:00
addons BUILD: deviceatlas: fix empty "-I" left on CFLAGS 2024-01-26 19:46:59 +01:00
admin MINOR: acme.sh: don't use '*' in the filename for wildcard domain 2023-12-04 11:53:50 +01:00
dev DEV: h2: support hex-encoded data sequences in mkhdr 2024-01-12 18:59:59 +01:00
doc DOC: configuration: clarify http-request wait-for-body 2024-01-29 07:48:30 +01:00
examples CLEANUP: assorted typo fixes in the code and comments 2023-11-23 16:23:14 +01:00
include BUILD: makefile: also define cmd_CXX to pretty-print C++ build commands 2024-01-26 18:54:23 +01:00
reg-tests MINOR: connection: add sample fetches to report per-connection glitches 2024-01-18 17:21:44 +01:00
scripts SCRIPTS: mk-patch-list: produce a list of patches 2023-12-18 20:50:51 +01:00
src BUG/MAJOR: ssl_sock: Always clear retry flags in read/write functions 2024-01-29 15:10:24 +01:00
tests Revert "MAJOR: import: update mt_list to support exponential back-off" 2023-09-15 17:13:43 +02:00
.cirrus.yml CI: cirrus-ci: display gdb bt if any 2023-09-22 08:28:30 +02:00
.gitattributes
…
.gitignore
…
.mailmap
…
.travis.yml
…
BRANCHES
…
BSDmakefile
…
CHANGELOG [RELEASE] Released version 3.0-dev2 2024-01-26 20:11:39 +01:00
CONTRIBUTING
…
INSTALL DOC: INSTALL: require at least WolfSSL 5.6.6 2024-01-12 17:48:45 +01:00
LICENSE
…
MAINTAINERS
…
Makefile BUILD/MEDIUM: deviceatlas: updating the addon part. 2024-01-26 18:54:27 +01:00
README
…
SUBVERS
…
VERDATE [RELEASE] Released version 3.0-dev2 2024-01-26 20:11:39 +01:00
VERSION [RELEASE] Released version 3.0-dev2 2024-01-26 20:11:39 +01:00

README

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)