]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: trace: avoid race condition when retrieving session from conn->owner
authorWilly Tarreau <w@1wt.eu>
Fri, 18 Mar 2022 16:37:20 +0000 (17:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 18 Mar 2022 16:43:28 +0000 (17:43 +0100)
commit6e805dab2add31c7a60f2f4be933f8e6903151fe
treeee3054d91ae4bc804076bdceb6c89ff07987b36f
parentd1480cc8a44395c27c715c0dd431d3e37a83a4c8
BUG/MEDIUM: trace: avoid race condition when retrieving session from conn->owner

There's a rare race condition possible when trying to retrieve session from
a back connection's owner, that was fixed in 2.4 and described in commit
3aab17bd5 ("BUG/MAJOR: connection: reset conn->owner when detaching from
session list").

It also affects the trace code which does the same, so the same fix is
needed, i.e. check from conn->session_list that the connection is still
enlisted. It's visible when sending a few tens to hundreds of parallel
requests to an h2 backend and enabling traces in parallel.

This should be backported as far as 2.2 which is the oldest version
supporting traces.
src/trace.c