]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: queue: lock around the call to pendconn_process_next_strm()
authorWilly Tarreau <w@1wt.eu>
Tue, 6 May 2025 16:55:04 +0000 (18:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 6 May 2025 16:59:54 +0000 (18:59 +0200)
commit99f5be5631923844fb738fdc2d001178a2756834
tree12e6523d49e761985ef6edbc5a1dd6fc72cb164c
parente035f0c48e93df1cccfe108881cb2d80d5e62d07
BUG/MAJOR: queue: lock around the call to pendconn_process_next_strm()

The extra call to pendconn_process_next_strm() made in commit cda7275ef5
("MEDIUM: queue: Handle the race condition between queue and dequeue
differently") was performed after releasing the server queue's lock,
which is incompatible with the calling convention for this function.
The result is random corruption of the server's streams list likely
due to picking old or incorrect pendconns from the queue, and in the
end infinitely looping on apparently already locked mt_list objects.
Just adding the lock fixes the problem.

It's very difficult to reproduce, it requires low maxconn values on
servers, stickiness on the servers (cookie), a long enough slowstart
(e.g. 10s), and regularly flipping servers up/down to re-trigger the
slowstart.

No backport is needed as this was only in 3.2.
src/queue.c