BUG/MAJOR: threads/queue: avoid recursive locking in pendconn_get_next_strm()
pendconn_get_next_strm() is called from process_srv_queue() under the
server lock, and calls stream_add_srv_conn() with this lock held, while
the latter tries to take it again. This results in a deadlock when
a server's maxconn is reached and haproxy is built with thread support.
diff --git a/src/queue.c b/src/queue.c
index 1796ac1..1dea7d5 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -124,7 +124,7 @@
/* we want to note that the stream has now been assigned a server */
strm->flags |= SF_ASSIGNED;
strm->target = &srv->obj_type;
- stream_add_srv_conn(strm, srv);
+ __stream_add_srv_conn(strm, srv);
HA_ATOMIC_ADD(&srv->served, 1);
HA_ATOMIC_ADD(&srv->proxy->served, 1);
if (px->lbprm.server_take_conn)