]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: resolvers: Wake resolver task up whne unlinking a stream requester
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Sep 2025 05:57:28 +0000 (07:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Sep 2025 05:57:29 +0000 (07:57 +0200)
Another regression introduced with the commit 3023e9819 ("BUG/MINOR:
resolvers: Restore round-robin selection on records in DNS answers"). Stream
requesters are unlinked from any theards. So we must not try to queue the
resolver's task here because it is not allowed to do so from another thread
than the task thread. Instead, we can simply wake the resolver's task up. It
is only performed when the last stream requester is unlink from the
resolution.

This patch should fix the issue #3119. It must be backported with the commit
above.

src/resolvers.c

index 0a424cf7c95817bccd50a26bc2b30a418cba0a69..9306996f47c991bf450cff0ef031d9e8379d3eba 100644 (file)
@@ -2227,7 +2227,7 @@ static void _resolv_unlink_resolution(struct resolv_requester *requester)
                else {
                        if (!tick_isset(res->last_resolution))
                                res->last_resolution = now_ms;
-                       resolv_update_resolvers_timeout(res->resolvers);
+                       task_wakeup(res->resolvers->t, TASK_WOKEN_OTHER);
                }
                return;
        }