haproxy/include/proto
Willy Tarreau 86c6a9221a BUG/MEDIUM: shctx: bound the number of loops that can happen around the lock
Given that a "count" value of 32M was seen in _shctx_wait4lock(), it
is very important to prevent this from happening again. It's absolutely
essential to prevent the value from growing unbounded because with an
increase of the number of threads, the number of successive failed
attempts will necessarily grow.

Instead now we're scanning all 2^p-1 values from 3 to 255 and are
bounding to count to 255 so that in the worst case each thread tries an
xchg every 255 failed read attempts. That's one every 4 on average per
thread when there are 64 threads, which corresponds to the initial count
of 4 for the first attempt so it seems like a reasonable value to keep a
low latency.

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.
2020-05-01 13:32:20 +02:00
..
acl.h MINOR: acl: Pass the ACLs as an explicit parameter of build_acl_cond 2017-10-31 11:36:12 +01:00
action.h MINOR: tcp-rules: Make tcp-request capture a custom action 2020-01-20 15:18:45 +01:00
activity.h MINOR: time: move the cpu, mono, and idle time to thread_info 2019-05-20 21:14:14 +02:00
applet.h MEDIUM: buffer: remove the buffer_wq lock 2020-02-26 10:39:36 +01:00
arg.h MEDIUM: arg: make make_arg_list() stop after its own arguments 2020-02-14 19:02:06 +01:00
auth.h MEDIUM: pattern: The match function browse itself the list or the tree. 2014-03-17 18:06:07 +01:00
backend.h REORG: stream/backend: move backend-specific stuff to backend.c 2020-01-17 18:30:36 +01:00
channel.h MEDIUM: buffer: remove the buffer_wq lock 2020-02-26 10:39:36 +01:00
checks.h CLEANUP: checks: Fix checks includes 2020-04-29 13:32:29 +02:00
cli.h MINOR: cli: add cli_msg(), cli_err(), cli_dynmsg(), cli_dynerr() 2019-08-09 10:11:38 +02:00
compression.h REORG: filters: Prepare creation of the HTTP compression filter 2016-02-09 14:53:15 +01:00
connection.h MINOR: connection: Add a function to install a mux for a health-check 2020-04-27 09:39:38 +02:00
dict.h MINOR: dict: Add dictionary new data structure. 2019-06-05 08:33:35 +02:00
dns.h MINOR: action: new '(http-request|tcp-request content) do-resolve' action 2019-04-23 11:41:52 +02:00
fcgi-app.h MEDIUM: fcgi-app: Add FCGI application and filter 2019-09-17 10:18:54 +02:00
fd.h CLEANUP: assorted typo fixes in the code and comments 2020-04-17 09:37:36 +02:00
filters.h MEDIUM: filters: Adapt filters API to allow again TCP filtering on HTX streams 2019-11-15 13:43:08 +01:00
flt_http_comp.h MINOR: compression: Rename the function check_legacy_http_comp_flt() 2018-12-11 17:09:31 +01:00
freq_ctr.h BUILD: freq_ctr: proto/freq_ctr needs to include common/standard.h 2020-03-07 06:07:18 +01:00
frontend.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
h1_htx.h MEDIUM: h1-htx: Add HTX EOM block when the message is in H1_MSG_DONE state 2019-12-11 16:46:16 +01:00
hlua_fcn.h MINOR: lua: add utility function for check boolean argument 2016-11-24 21:35:10 +01:00
hlua.h MINOR: lua: export applet and task handlers 2019-08-21 14:32:09 +02:00
http_ana.h MEDIUM: http: Add a ruleset evaluated on all responses just before forwarding 2020-02-06 14:55:34 +01:00
http_fetch.h MEDIUM: http_fetch: Remove code relying on HTTP legacy mode 2019-07-19 09:18:27 +02:00
http_htx.h MINOR: http-htx: Export functions to update message authority and host 2020-04-29 13:32:29 +02:00
http_rules.h MEDIUM: http: Add a ruleset evaluated on all responses just before forwarding 2020-02-06 14:55:34 +01:00
lb_chash.h MINOR: lb: allow redispatch when using consistent hash 2019-01-02 20:22:17 +01:00
lb_fas.h MEDIUM: backend: add the 'first' balancing algorithm 2012-02-21 22:27:27 +01:00
lb_fwlc.h [CLEANUP] backend: move LB algos to individual files 2009-10-01 11:19:37 +02:00
lb_fwrr.h [CLEANUP] backend: move LB algos to individual files 2009-10-01 11:19:37 +02:00
lb_map.h MEDIUM: threads/lb: Make LB algorithms (lb_*.c) thread-safe 2017-10-31 13:58:31 +01:00
listener.h BUG/MINOR: listener: fix off-by-one in state name check 2019-12-11 15:51:37 +01:00
log.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
map.h MINOR: samples: rename some struct member from "smp" to "data" 2015-08-20 17:13:46 +02:00
mux_pt.h MEDIUM: connection: start to introduce a mux layer between xprt and data 2017-10-31 18:03:23 +01:00
mworker.h BUG/MINOR: mworker: properly pass SIGTTOU/SIGTTIN to workers 2019-12-11 14:26:53 +01:00
obj_type.h BUG/MINOR: obj_type: Handle stream object in obj_base_ptr() function 2020-04-27 09:39:38 +02:00
pattern.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
payload.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
peers.h MINOR: peers: Make peers protocol support new "server_name" data type. 2019-06-05 08:42:33 +02:00
pipe.h [MEDIUM] introduce pipe pools 2009-01-25 13:49:53 +01:00
port_range.h BUG/MEDIUM: port_range: Make the ring buffer lock-free. 2019-04-30 15:10:17 +02:00
proto_sockpair.h MEDIUM: protocol: sockpair protocol 2018-09-12 07:20:17 +02:00
proto_tcp.h REORG: connection: move tcp_connect_probe() to conn_fd_check() 2019-12-27 16:38:43 +01:00
proto_udp.h CLEANUP: fix inconsistency between fd->iocb, proto->accept and accept() 2016-04-14 11:18:22 +02:00
protocol_buffers.h BUG/MINOR: protocol_buffer: Wrong maximum shifting. 2020-04-02 15:09:46 +02:00
protocol.h BUG/MEDIUM: protocols: add a global lock for the init/deinit stuff 2019-07-24 16:45:02 +02:00
proxy.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
queue.h MEDIUM: init: use initcall for all fixed size pool creations 2018-11-26 19:50:32 +01:00
raw_sock.h CLEANUP: connection: unexport raw_sock and ssl_sock 2016-12-22 23:26:38 +01:00
ring.h MINOR: ring: add a generic CLI io_handler to dump a ring buffer 2019-08-27 17:14:19 +02:00
sample.h MINOR: sample: make sample_parse_expr() able to return an end pointer 2020-02-14 19:02:06 +01:00
server.h BUG/MINOR: peers: Incomplete peers sections should be validated. 2020-04-15 10:47:39 +02:00
session.h BUG/MEDIUM: sessions: Always pass the mux context as argument to destroy a mux 2020-04-27 15:53:43 +02:00
shctx.h BUG/MEDIUM: shctx: bound the number of loops that can happen around the lock 2020-05-01 13:32:20 +02:00
signal.h MEDIUM: initcall: use initcalls for a few initialization functions 2018-11-26 19:50:32 +01:00
sink.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
spoe.h BUG/MEDIUM: spoe: Be sure the sample is found before setting its context 2019-05-07 22:16:41 +02:00
ssl_sock.h MINOR: ssl: Export a generic function to parse an alpn string 2020-04-27 09:39:37 +02:00
stats.h MINOR: stats: prepare to add a description with each stat/info field 2019-10-10 11:30:07 +02:00
stick_table.h MINOR: stick-table: Add "server_name" new data type. 2019-06-05 08:33:35 +02:00
stream_interface.h BUILD: stream-int: fix a few includes dependencies 2020-03-11 14:15:33 +01:00
stream.h MEDIUM: stream: Make the unique_id member of struct stream a struct ist 2020-03-05 20:21:58 +01:00
task.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
tcp_rules.h MINOR: action: Use trk_idx instead of tcp/http_trk_idx 2017-10-31 11:36:12 +01:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00
trace.h MINOR: trace: Add a set of macros to trace events if HA is compiled with debug 2019-11-06 10:14:32 +01:00
vars.h MINOR: vars: Add 'unset-var' action/converter 2016-11-09 22:57:01 +01:00