mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-25 07:41:36 +02:00
In process_peer_sync: a check was performed to know whether the peers section handler should kill itself if the corresponding proxy was not started on the current process. This logic was initially implemented in early 1.6 development to prevent some issues when peers where used in conjunction with nbproc > 1: f83d3fe00a MEDIUM: init: stop any peers section not bound to the correct process 46dc1ca MEDIUM: peers: unregister peers that were never started But later in 1.6 dev, a new commit has been introduced: 47c8c029db MEDIUM: init: completely deallocate unused peers With the latter, the check implemented in 46dc1ca ("MEDIUM: peers: unregister peers that were never started") will never succeed: it is dead code. Since nbproc support has been dropped in 2.5, things have changed a bit: f83d3fe00a logic was moved in mworker_cleanlisteners, but as in 46dc1ca : peers task is safely destroyed before peers_fe is set to NULL. Conversely, peers_fe is first set by init_peers_frontend() before peers task is scheduled by peers_init_sync() in check_config_validity(). Again, it is safe to say that we will never reach !peers->peers_fe in process_peer_sync(): this self-killing mechanism is not relevant anymore. -- To cut a long story short: I stumbled on this while tracking down current signal api usage. This led me to a signal_unregister_handler() call performed in the aforementionned dead code. To me this code was potentially unsafe because signal_unregister_handler() is not thread safe and here it was used within a task initialized via task_new_anywhere(). So I decided to check how bad this could be (ie: conditions to be met for this code to run).. and here we are.
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
C
98.1%
Shell
0.8%
Makefile
0.5%
Lua
0.2%
Python
0.2%