]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: threads/tasks: fix the scheduler again
authorWilly Tarreau <w@1wt.eu>
Wed, 8 Nov 2017 13:05:19 +0000 (14:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Nov 2017 13:05:19 +0000 (14:05 +0100)
commit9e45b33f7ee78953d3ec6ad32d4d9eed3bfc897a
treeeacfdbb7d684ab1961c04a5f3b486f7087933169
parentecd2e15919f31df2c0e42b3a1ac74f1344d9a2ae
BUG/MAJOR: threads/tasks: fix the scheduler again

My recent change in commit ce4e0aa ("MEDIUM: task: change the construction
of the loop in process_runnable_tasks()") was bogus as it used to keep the
rq_next across an unlock/lock sequence, occasionally leading to crashes for
tasks that are eligible to any thread. We must use the lookup call for each
new batch instead. The problem is easily triggered with such a configuration :

    global
        nbthread 4

    listen check
        mode http
        bind 0.0.0.0:8080
        redirect location /
        option httpchk GET /
        server s1 127.0.0.1:8080 check inter 1
        server s2 127.0.0.1:8080 check inter 1

Thanks to Olivier for diagnosing this one. No backport is needed.
src/task.c