mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MAJOR: tasks: don't requeue global tasks into the local queue
A bug was introduced by commit 77015abe0 ("MEDIUM: tasks: clean up the front side of the wait queue in wake_expired_tasks()"): front tasks that are not yet expired were incorrectly requeued into the local wait queue instead of the global one. Because of this, the same task could be found by the same thread on next invocation and be unlinked without locking, allowing another thread to requeue it in parallel, and conversely another thread could unlink it while the task was being walked over, causing all sorts of crashes and endless loops in wake_expired_tasks() and affiliates. This bug can easily be triggered by stressing the do_resolve action in multi-thread (after applying the fixes required to get do_resolve to work with threads). It certainly is the cause of issue #758. This must be backported to 2.2 only.
This commit is contained in:
parent
d3db3846c5
commit
783afbe93b
@ -315,7 +315,7 @@ void wake_expired_tasks()
|
||||
*/
|
||||
__task_unlink_wq(task);
|
||||
if (tick_isset(task->expire))
|
||||
__task_queue(task, &tt->timers);
|
||||
__task_queue(task, &timers);
|
||||
goto lookup_next;
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user