[Dnsmasq-discuss] CPU at 100%

Simon Kelley simon at thekelleys.org.uk
Wed Jan 18 12:36:22 GMT 2012


On 18/01/12 12:01, Christopher Moore ( Linux Epos) wrote:
> Hi,
>
> I'm running dnsmasq 2.59 on a few hundred linux servers.
>
> After anything from an hour to a few days dnsmasq will use 100% of the CPU.
>
> Doing an strace on a running process I get:
>
> time(NULL) = 1326874188
> fcntl64(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
> fcntl64(0, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0
> recvmsg(0, 0xbfb3fbb4, MSG_PEEK|MSG_TRUNC) = -1 ENOTSOCK (Socket
> operation on non-socket)
> recvmsg(0, 0xbfb3fbb4, 0) = -1 ENOTSOCK (Socket operation on non-socket)
> fcntl64(0, F_SETFL, O_RDWR|O_LARGEFILE) = 0
> select(6, [0 3 4 5], [], [], NULL) = 1 (in [0])
>
> time(NULL) = 1326874188
> fcntl64(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
> fcntl64(0, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0
> recvmsg(0, 0xbfb3fbb4, MSG_PEEK|MSG_TRUNC) = -1 ENOTSOCK (Socket
> operation on non-socket)
> recvmsg(0, 0xbfb3fbb4, 0) = -1 ENOTSOCK (Socket operation on non-socket)
> fcntl64(0, F_SETFL, O_RDWR|O_LARGEFILE) = 0
> select(6, [0 3 4 5], [], [], NULL) = 1 (in [0])
>
> This repeats very quickly until the dnsmasq process is restarted.
>
> Any ideas?

How is the daemon being started? It's getting confused about file 
descriptor zero, which is stdin, and is normally open to /dev/null on a 
"daemonised" dnsmasq process.

If you restart dnsmasq and strace it before things go awry, is it 
select()ing on file descriptor zero, or a different set of file descriptors?

Complete dnsmasq configuration would be useful too.

Cheers,

Simon.

>
> Regards, Chris.
>
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




More information about the Dnsmasq-discuss mailing list