]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: dns: attempt to lock globaly for msg waiter list instead of use barrier
authorEmeric Brun <ebrun@haproxy.com>
Wed, 20 Oct 2021 08:49:53 +0000 (10:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Oct 2021 15:52:07 +0000 (17:52 +0200)
commit7045590d8a0af9a16ab01e96340060b3bf9dd72c
treeaa7529868fdf5d55d57cbb25ce1ffe938b5e76eb
parentd20dc21eeca1d5e936f7a8bfd3d865a032499c65
BUG/MAJOR: dns: attempt to lock globaly for msg waiter list instead of use barrier

The barrier is insufficient here to protect the waiters list as we can
definitely catch situations where ds->waiter shows an inconsistency
whereby the element is not attached when entering the "if" block and
is already attached when attaching it later.

This patch uses a larger lock to maintain consistency. Without it the
code would crash in 30-180 minutes under heavy stress, always showing
the same problem (ds->waiter->n->p != &ds->waiter). Now it seems to
always resist, suggesting that this was indeed the problem.

This will have to be backported to 2.4.
src/dns.c