haproxy/src
Christopher Faulet 81991d3285 BUG/MAJOR: thread: Be sure to request a sync between threads only once at a time
The first thread requesting a synchronization is responsible to write in the
"sync" pipe to notify all others. But we must write only once in the pipe
between two synchronizations to have exactly one character in the pipe. It is
important because we only read 1 character in return when the last thread exits
from the sync-point.

Here there is a bug. If two threads request a synchronization, only the first
writes in the pipe. But, if the same thread requests several times a
synchronization before entering in the sync-point (because, for instance, it
detects many servers down), it writes as many as characters in the pipe. And
only one of them will be read. Repeating this bug many times will block HAProxy
on the write because the pipe is full.

To fix the bug, we just check if the current thread has already requested a
synchronization before trying to notify all others.

The patch must be backported in 1.8
2017-12-02 14:31:01 +01:00
..
51d.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
acl.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
action.c MINOR: action: Add function to check rules using an action ACT_ACTION_TRK_* 2017-10-31 11:36:12 +01:00
applet.c MEDIUM: applets: Don't process more than 200 active applets at once 2017-11-16 11:19:46 +01:00
arg.c BUG/MEDIUM: arg: ensure that we properly unlink unresolved arguments on error 2017-04-13 12:20:52 +02:00
auth.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
backend.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
base64.c [MINOR] add encode/decode function for 30-bit integers from/to base64 2010-10-30 19:04:33 +02:00
buffer.c MINOR: buffers: cache-align buffer_wq_lock 2017-11-26 11:10:51 +01:00
cache.c BUG/MEDIUM: cache: bad computation of the remaining size 2017-11-28 12:06:06 +01:00
cfgparse.c MINOR: config: report when "monitor fail" rules are misplaced 2017-12-01 18:25:08 +01:00
channel.c MINOR: channel: make the channel be a const in all {ci,co}_get* functions 2017-10-19 15:01:08 +02:00
checks.c BUG/MEDIUM: tcp-check: Don't lock the server in tcpcheck_main 2017-11-28 10:43:23 +01:00
chunk.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
cli.c MINOR/CLEANUP: proxy: rename "proxy" to "proxies_list" 2017-11-24 17:21:27 +01:00
compression.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
connection.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
da.c BUILD/MINOR: deviceatlas: enable thread support 2017-11-27 14:22:21 +01:00
dns.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
ev_epoll.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
ev_kqueue.c BUG/MEDIUM: kqueue: Don't bother closing the kqueue after fork. 2017-11-26 20:10:58 +01:00
ev_poll.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
ev_select.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
fd.c MINOR: threads: Use __decl_hathreads to declare locks 2017-11-13 11:38:17 +01:00
filters.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
flt_http_comp.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
flt_spoe.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
flt_trace.c MINOR: threads/filters: Update trace filter to add _per_thread callbacks 2017-10-31 13:58:32 +01:00
freq_ctr.c BUG/MAJOR: threads/freq_ctr: use a memory barrier to detect changes 2017-10-31 18:01:18 +01:00
frontend.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
h1.c BUG/MINOR: h1: the HTTP/1 make status code parser check for digits 2017-11-09 11:15:45 +01:00
h2.c BUG/MEDIUM: h2: always reassemble the Cookie request header field 2017-11-21 21:13:36 +01:00
haproxy.c MINOR: threads: Fix pthread_setaffinity_np on FreeBSD. 2017-12-02 14:23:12 +01:00
hash.c MINOR: hash: add new function hash_crc32 2015-01-20 19:48:05 +01:00
hathreads.c BUG/MAJOR: thread: Be sure to request a sync between threads only once at a time 2017-12-02 14:31:01 +01:00
hdr_idx.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
hlua.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
hlua_fcn.c MINOR/CLEANUP: proxy: rename "proxy" to "proxies_list" 2017-11-24 17:21:27 +01:00
hpack-dec.c MEDIUM: h2: change hpack_decode_headers() to only provide a list of headers 2017-11-21 21:13:36 +01:00
hpack-enc.c MEDIUM: hpack: implement basic hpack encoding 2017-10-31 18:03:24 +01:00
hpack-huff.c MINOR: hpack: implement the HPACK Huffman table decoder 2017-10-31 18:03:24 +01:00
hpack-tbl.c MINOR: hpack: implement the header tables management 2017-10-31 18:03:24 +01:00
i386-linux-vsys.c MEDIUM: listener: add support for linux's accept4() syscall 2012-10-08 20:11:03 +02:00
lb_chash.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_fas.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_fwlc.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_fwrr.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_map.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
listener.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
log.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
lru.c MINOR: lru: new function to delete <nb> least recently used keys 2016-01-11 07:31:35 +01:00
mailers.c MEDIUM: Add parsing of mailers section 2015-02-03 00:24:16 +01:00
map.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
memory.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
mux_h2.c BUG/MEDIUM: h2: don't report an error after parsing a 100-continue response 2017-11-29 15:41:32 +01:00
mux_pt.c MINOR: mux: Make sure every string is woken up after the handshake. 2017-11-23 19:35:42 +01:00
namespace.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
pattern.c MINOR: threads: Use __decl_hathreads to declare locks 2017-11-13 11:38:17 +01:00
payload.c MINOR: payload: add new sample fetch functions to process distcc protocol 2017-10-13 11:47:19 +02:00
peers.c BUG/MAJOR: thread/peers: fix deadlock on peers sync. 2017-12-01 15:06:43 +01:00
pipe.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
proto_http.c BUG/MEDIUM: peers: fix some track counter rules dont register entries for sync. 2017-11-29 19:16:22 +01:00
proto_tcp.c MINOR/CLEANUP: proxy: rename "proxy" to "proxies_list" 2017-11-24 17:21:27 +01:00
proto_udp.c CLEANUP: fix inconsistency between fd->iocb, proto->accept and accept() 2016-04-14 11:18:22 +02:00
proto_uxst.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
protocol.c BUILD: protocol: fix some build errors on OpenBSD 2016-08-10 19:31:58 +02:00
proxy.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
queue.c BUG/MAJOR: threads/queue: avoid recursive locking in pendconn_get_next_strm() 2017-11-26 18:50:30 +01:00
raw_sock.c BUG/MINOR: threads: Add missing THREAD_LOCAL on static here and there 2017-10-31 13:58:33 +01:00
rbtree.c [MINOR] imported the rbtree function from Linux kernel 2007-01-07 02:12:57 +01:00
regex.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
sample.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
server.c MINOR/CLEANUP: proxy: rename "proxy" to "proxies_list" 2017-11-24 17:21:27 +01:00
session.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
sha1.c IMPORT: sha1: import SHA1 functions 2017-10-25 04:45:48 +02:00
shctx.c BUILD: shctx: do not depend on openssl anymore 2017-11-08 14:33:36 +01:00
signal.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
ssl_sock.c BUG/MINOR: ssl: CO_FL_EARLY_DATA removal is managed by stream 2017-11-29 14:34:47 +01:00
standard.c MINOR: tools: emphasize the node being worked on in the tree dump 2017-11-15 19:43:05 +01:00
stats.c MINOR/CLEANUP: proxy: rename "proxy" to "proxies_list" 2017-11-24 17:21:27 +01:00
stick_table.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
stream.c BUG/MEDIUM: stream: fix session leak on applet-initiated connections 2017-11-29 14:26:11 +01:00
stream_interface.c MINOR: mux: Make sure every string is woken up after the handshake. 2017-11-23 19:35:42 +01:00
task.c MINOR: task: align the rq and wq locks 2017-11-26 11:10:51 +01:00
tcp_rules.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
time.c BUG/MEDIUM: threads/time: maintain a common time reference between all threads 2017-11-23 16:32:32 +01:00
trace.c CONTRIB: trace: try to display the function's return value on exit 2017-10-24 19:54:25 +02:00
uri_auth.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
vars.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
wurfl.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
xxhash.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00