mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-15 20:03:33 -04:00
HAProxy - Load balancer
There's a recurring issue regarding shared library loading from Lua. If the imported library is linked with a different version of openssl but doesn't use it, the check will trigger and emit a warning. In practise it's not necessarily a problem as long as the API is the same, because all symbols are replaced and the library will use the included ssl lib. It's only a problem if the library comes with a different API because the dynamic linker will only replace known symbols with ours, and not all. Thus the loaded lib may call (via a static inline or a macro) a few different symbols that will allocate or preinitialize structures, and which will then pass them to the common symbols coming from a different and incompatible lib, exactly what happens to users of Lua's luaossl when building haproxy with quictls and without rebuilding luaossl. In order to better address this situation, we now define groups of symbols that must always appear/disappear in a consistent way. It's OK if they're all absent from either haproxy or the lib, it means that one of them doesn't use them so there's no problem. But if any of them is defined on any side, all of them must be in the exact same state on the two sides. The symbols are represented using a bit in a mask, and the mask of the group of other symbols they're related to. This allows to check 64 symbols, this should be OK for a while. The first ones that are tested for now are symbols whose combination differs between openssl versions 1.0, 1.1, and 3.0 as well as quictls. Thus a difference there will indicate upcoming trouble, but no error will mean that we're running on a seemingly compatible API and that all symbols should be replaced at once. The same mechanism could possibly be used for pcre/pcre2, zlib and the few other optional libs that may occasionally cause runtime issues when used by dependencies, provided that discriminatory symbols are found to distinguish them. But in practice such issues are pretty rare, mainly because loading standard libs via Lua on a custom build of haproxy is not pretty common. In the event that further symbol compatibility issues would be reported in the future, backporting this patch as well as the following series might be an acceptable solution given that the scope of changes is very narrow (the malloc stuff is needed so that the malloc/free tests can be dropped): BUG/MINOR: illegal use of the malloc_trim() function if jemalloc is used MINOR: pools: make sure 'no-memory-trimming' is always used MINOR: pools: intercept malloc_trim() instead of trying to plug holes MEDIUM: pools: move the compat code from trim_all_pools() to malloc_trim() MINOR: pools: export trim_all_pools() MINOR: pattern: use trim_all_pools() instead of a conditional malloc_trim() MINOR: tools: relax dlopen() on malloc/free checks |
||
|---|---|---|
| .github | ||
| addons | ||
| admin | ||
| dev | ||
| doc | ||
| examples | ||
| include | ||
| reg-tests | ||
| scripts | ||
| src | ||
| tests | ||
| .cirrus.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .travis.yml | ||
| BRANCHES | ||
| 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)