[BUG] dnsmasq-full 2.90 freeze in netlink (nftables) — infinite recvmsg(), no crash, no core dump
Firmware: OpenWrt 24.10.5 r29087-d9c5716d1d LuCI openwrt-24.10 branch 25.340.26705~d88390b
dnsmasq version: dnsmasq-full 2.90-r4
Summary
I am experiencing a reproducible issue where dnsmasq does not crash but freezes, stops responding to DNS queries, and stops listening on port 53. The process remains alive (PID exists), but it becomes completely unresponsive.
There is no core dump, because dnsmasq does not receive a fatal signal — it simply hangs.
A watchdog (FAST‑WATCH) detects the freeze and restarts dnsmasq, restoring functionality temporarily.
Symptoms
- dnsmasq PID stays alive
- port 53 stops listening
- DNS queries stop responding
- no crash, no core dump
- strace remains attached to the old PID
- only a restart fixes the issue
- freeze repeats after some time
Environment
- OpenWrt 24.10.5 (nftables firewall)
- dnsmasq-full 2.90-r4
- nftables is enabled and active
- no ujail, dnsmasq runs standalone (PPID=1)
Diagnosis
Using strace -p <pid> -f -tt -s 256, I captured the moment when dnsmasq freezes.
The freeze happens inside netlink while dnsmasq is processing nftables data.
The process enters an infinite recvmsg() loop with NLMSG_MULTI responses:
sendto(5, NLMSG_TYPE=0xa01 / 0xa0a / 0xa09 ...)
recvmsg(5, ...)
recvmsg(5, ...)
recvmsg(5, ...)
...
(infinite)
dnsmasq receives a very large NLMSG_MULTI response from nftables and never exits the loop.
This is a freeze, not a crash.
Key observations
- dnsmasq repeatedly receives NLMSG_MULTI messages
- dnsmasq allocates new buffers via mmap()
- dnsmasq never returns NLMSG_DONE for the second batch
- dnsmasq stops serving DNS entirely
- no fatal signal → no core dump
This behavior matches previously reported netlink/nftables freeze bugs, but it still occurs in dnsmasq 2.90.
Expected behavior
dnsmasq should correctly process netlink responses and return to DNS service.
Actual behavior
dnsmasq becomes stuck in netlink processing and stops serving DNS until restarted.
Full strace log
(Insert your full log here inside a code block)
<PASTE YOUR FULL LOG HERE>
Additional notes
- This issue is reproducible.
- It happens even with dnsmasq-full 2.90-r4 (latest in OpenWrt).
- nftables ruleset is standard (OpenWrt default).
- No custom patches.
- No jail / procd interference.
Possible root cause
A regression or incomplete fix in dnsmasq’s handling of:
- NLMSG_MULTI
- nftables netlink dumps
- large nftables rulesets
- multi-part netlink responses
dnsmasq appears to enter an infinite loop while parsing nftables objects.
Temporary workarounds**
- disable nftset integration in dnsmasq
- reduce nftables ruleset size
- restart dnsmasq via watchdog
If needed, I can provide:
- crash passports
- system snapshots
- dnsmasq logs
- nftables ruleset
- more strace captures
The link to the dnsmasq_strace.log file has been uploaded to Mega.