dnsmasq often using 100% of CPU if the upstream nameserver is unreachable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dnsmasq (Ubuntu) |
Triaged
|
Medium
|
Unassigned | ||
Focal |
Triaged
|
Medium
|
Unassigned | ||
Jammy |
Triaged
|
Medium
|
Unassigned | ||
Kinetic |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Release: 22.04
Codename: jammy
Kernel: Linux 5.15.0-40-generic x86_64
⏵ apt-cache policy dnsmasq
Installed: 2.86-1.1ubuntu0.1
dnsmasq is caught in a loop after every dns request, resulting in 100% CPU usage for several minutes each time. This leads to a hot and lethargic computer. During this time thousands of the following messages (see below) are printed from strace.
The loop tends to obsess on denied connections, but there are so many I'm not 100% sure.
systemd-resolved is _not_ running, some bugs refer to that.
⏵ head /etc/dnsmasq.
address=
port=53
resolv-
⏵ sudo strace -p 3519 (dnsmasq)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}], 9, -1) = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name=
ioctl(4, SIOCGIFNAME, {ifr_ifindex=1, ifr_name="lo"}) = 0
sendto(14, "\302\221\
tags: | added: server-triage-discuss |
tags: | removed: server-triage-discuss |
summary: |
- dnsmasq often using 100% of CPU + dnsmasq often using 100% of CPU if the upstream nameserver is + unreachable |
hi, mixmastamyk. Thanks for taking the time to report this bug.
Can you track those spikes to any specific network operation? Do you have logs for these specific spikes?
Finally, would you be able to provide a minimal reproducer with steps and configuration so we can reproduce the issue?