]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: captures: free() an error capture out of the proxy lock
authorWilly Tarreau <w@1wt.eu>
Sat, 17 Sep 2022 09:07:19 +0000 (11:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 17 Sep 2022 09:07:19 +0000 (11:07 +0200)
commitda9f25875958757fd1f16b74bd887977e78c8b09
tree6f4617376ac314917487da547b9d13522841a818
parenta94bedc0de218e784683e52ba669912b6cc71741
BUG/MEDIUM: captures: free() an error capture out of the proxy lock

Ed Hein reported in github issue #1856 some occasional watchdog panics
in 2.4.18 showing extreme contention on the proxy's lock while the libc
was in malloc()/free(). One cause of this problem is that we call free()
under the proxy's lock in proxy_capture_error(), which makes no sense
since if we can free the object under the lock after it's been detached,
we can also free it after releasing the lock (since it's not referenced
anymore).

This should be backported to all relevant versions, likely all
supported ones.
src/proxy.c