Jrme reported an amazing crash in the spinlock version of _shctx_wait4lock() with an extremely high <count> value of 32M! The root cause is that the function cannot deal with contention on the lock at all because it forgets to check if the lock's value has changed! As such, every time it's called due to a contention, it waits twice as long before trying again and lets the caller check for the contention by itself. The correct thing to do is to compare the value again at each loop. This way it makes sure to mostly perform read accesses on the shared cache line without writing too often, and to be ready fast enough to try to grab the lock. And we must not increase the count on success either! Unfortunately I'd have expected to see a performance boost on the cache with this but there was absolutely no change, so it's very likely that these issues only happen once in a while and are sufficient to derail the process when they strike, but not to have a permanent performance impact. The bug was introduced with the shctx entries in 1.5 so the fix must be backported to all versions. Before 1.8 the function was called _shared_context_wait4lock() and was in shctx.c.
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
Shell
100%