[Dnsmasq-discuss] Mysterious dnsmasq 2.38 'hangs'

Paul Chambers bod at bod.org
Fri Feb 16 20:35:14 GMT 2007


I have dnsmasq 2.38 installed on Fedora Core 5 from an RPM (official
'extras' repository). When initially started, dnsmasq works very well,
big improvement over my previous 'bind+dhcpd' setup. But it only lasts a
few hours. Eventually dnsmasq will cease answering queries or DHCP
requests. Or perhaps it's answering them so slowly that the request
times out.

I stopped running the daemon from an init script, and ran it by hand on
a console with -d, to see what's happening. Same behavior, no log
messages to indicate anything wrong, but interestingly, I'll usually get
a log line emitted for each signal I send to it. For example, I tried
sending 'sigusr1' to get a dump, and would sometimes get the first
header line, followed by the second header line maybe ten seconds later.
Other times I'd get several lines, then it'd stop. Hitting cntl-C always
gets me to a shell prompt, but interestingly, if I immeidately restart
it with -d, I'll usually get one line logged to the console and it'll
'hang' again.

I've tried attaching to it with gdb a few times, and it always seems to
be inside syslog() when I do so, even though there's little coming out
on the console. That probably implies that the delay is actually
occuring inside syslog? Might it have something to do with looking up
the host's name to generate the syslog entry?

I've also rebuilt it from source, and added extra logging here and
there, without learning anything significant. I still get the 'hang'
occuring.

I've had to switch back to bind for now.

Any suggestions?

Paul

Some context: the linux box running dnsmasq is my firewall/gateway for
my home network, it's an 1.8 GHz athlon with 1GB ram. It has a 3ware
raid card with two RAID-5 arrays on it. I have a fairly straightforward
network setup with three interfaces - to the internet, to my wired lan,
and a wireless LAN card (currently disabled).

All addresses besides the box itself are assigned by DHCP, with nine of
them being static assignments. I guess I have quite a few devices on the
network for a home lan, maybe 20-30. The linux box has a few (eight?)
aliases to the same IP address, in /etc/hosts. I have an /etc/ethers
file set up, too. I have a couple of server' lines in the config file
that redirect DNS queries for my employer's domain to intranet DNS
servers, which are only accessible across a VPN tunnel that I manually
connect only when I need to.

Dnsmasq is configured with 'bind-interfaces' since I still have bind
serving my 'external view' of my domain (axfr to everydns.net). Once
dnsmasq is behaving, I plan to ditch bind altogether. What would people
suggect for my 'external' dns server? djbdns? maradns? All it would have
to do is service the axfr request from everydns.net.




More information about the Dnsmasq-discuss mailing list