[Dnsmasq-discuss] CPU at 100%
Simon Kelley
simon at thekelleys.org.uk
Wed Jan 18 15:24:29 GMT 2012
On 18/01/12 15:17, Christopher Moore ( Linux Epos) wrote:
> -----Original message-----
> To: Christopher Moore ( Linux Epos)<chris at linuxepos.com>;
> CC: dnsmasq-discuss at lists.thekelleys.org.uk;
> From: Simon Kelley<simon at thekelleys.org.uk>
> Sent: Wed 18-01-2012 15:00
> Subject: Re: [Dnsmasq-discuss] CPU at 100%
>> Quoting myself:
>>
>> > The simplest explanation for all the data we have so far is that the
>> > socket() call which creates the netlink socket sometimes fails to do
>> > so and returns zero (not -1, which is the error case, and trapped).
>>
>> The magic of Google brings up a report of exactly that:
>>
>> http://code.google.com/p/chromium/issues/detail?id=27446
>>
>>
>> Are you by any chance using kernels around 2.6.27?
>>
>> Simon.
>>
>>
>
> I'm using kernel 2.6.35.
> It could well be that I'm mistaken and that the runaway happens when the process first starts and not after some time.
> I'm going to put some monitoring on to check if the netlink socket exists when the process is started or disapears after some time.
> I'll report back in a few days.
> Thanks for all of your help.
>
OK, one more hypothesis. I think that exactly the symptoms you are
seeing sometimes could occur if dnsmasq is started without an open file
descriptor zero (which is stdin, of course). Basically, the netlink
socket would end up being the first available socket number which would
be zero, and later dnsmasq would close fd 0, assuming it to be stdin,
and re-open it as /dev/null.
I wonder if initlog is doing this (starting dnsmasq without a fd 0).
initlog seems to be long deprecated and I can't seem to google-up any
source code for it. A good test would be to dump initlog from your
startup and see if the problem goes away.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list