]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: dns: schedule idle task after setting its thread
authorManu Nicolas <e.nicolas@criteo.com>
Tue, 18 Aug 2026 17:24:47 +0000 (17:24 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Aug 2026 09:19:51 +0000 (11:19 +0200)
commit70e4074434e8f8687e2671cff2d5b1355c3f812d
tree8c46ad7d30d5501c2edd3516c7a8c9fddbb8ac24
parentfd9570f30319b2e845576fdd089e519e57b906e9
BUG/MINOR: dns: schedule idle task after setting its thread

Commit b8a311f49 ("MEDIUM: dns: Stick the TCP nameserver tasks to the
resolvers' thread") assigns each stream nameserver task to the resolver
thread during configuration finalization. However, dns_stream_init()
has already queued the idle task by then.

task_set_thread() removes the task from its old wait queue and queues
it again after changing its owner. The current thread still belongs to
the old owner, which violates wait-queue ownership. Strict builds hit
the task->tid assertion while finalizing a configuration containing a
TCP nameserver.

Leave the idle task unqueued during stream initialization. Once
finalization has set all three stream task affinities, wake the idle
task so it schedules its expiration on the resolver thread.

No backport is needed. The offending commit is only present in the
development branch.
src/dns.c
src/resolvers.c