mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-30 15:21:04 +01:00
BUG/MEDIUM: queues: Don't forget to unlock the queue before exiting
In assign_server_and_queue(), there's a rare case when the server was full, so we created a pendconn, another server was considered but in the meanwhile the pendconn was unqueued already, so we just left the function. We did so, however, while still holding the queue lock, which will ultimately lead to a deadlock, and ultimately the watchdog would kill the process. To fix that, just unlock the queue before leaving. This should be backported to 3.2.
This commit is contained in:
parent
1b443bdec5
commit
e9d34f991e
@ -1137,6 +1137,7 @@ int assign_server_and_queue(struct stream *s)
|
|||||||
|
|
||||||
HA_SPIN_LOCK(QUEUE_LOCK, &p->queue->lock);
|
HA_SPIN_LOCK(QUEUE_LOCK, &p->queue->lock);
|
||||||
if (!p->node.node.leaf_p) {
|
if (!p->node.node.leaf_p) {
|
||||||
|
HA_SPIN_UNLOCK(QUEUE_LOCK, &p->queue->lock);
|
||||||
/*
|
/*
|
||||||
* Okay we've been queued and
|
* Okay we've been queued and
|
||||||
* unqueued already, just leave
|
* unqueued already, just leave
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user