Date: Tue, 15 Feb 2011 13:38:08 +0100 From: =?UTF-8?Q?Marius_N=C3=BCnnerich?= <marius@nuenneri.ch> To: Ashish SHUKLA <ashish@freebsd.org> Cc: freebsd-ports@freebsd.org Subject: Re: pdnsd leaking udp sockets Message-ID: <AANLkTi=T_KLA9mPxzWufGKUuTf4Q2dAm0w59Z9%2BNdbOo@mail.gmail.com> In-Reply-To: <86oc6dzf1z.fsf@chateau.d.if> References: <AANLkTimtGzJSXDGG8JeOvuUWEEMXoKP6JN13CRFu6Cdn@mail.gmail.com> <86bp2d1wit.fsf@chateau.d.if> <AANLkTin=8BN6rEVH=XSFPFS7DZmxvTPZvqzK=912dhOY@mail.gmail.com> <86oc6dzf1z.fsf@chateau.d.if>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 15, 2011 at 12:56, Ashish SHUKLA <ashish@freebsd.org> wrote: > Marius N=C3=BCnnerich writes: >> Hi Ashish, > > [...] > >> dmesg and messages are clean. My FreeBSD ist 8.0-RELEASE/amd64. >> I took a look at the code too but couldn't see anything suspicious. I >> don't have time right now but one idea would be to add some dtrace >> probes to the source. > > I looked at the source code, and found a place where it's leaking socket > descriptors, but I'm not sure if this is the major source of impact. I fi= xed > that. You can test the diff[1] to see if it fixes issue you're experienci= ng. > > To reproduce this at my end, I switched to 'resolv.conf' server method an= d > commented 'server_ip' in the pdnsd.conf(5). Following are the contents of= the > resolv.conf(5): > > #v+ > chateau.d.if!abbe:~ % cat /etc/resolv.conf > nameserver 127.0.0.1 > nameserver 4.2.2.2 > #v- > > Before applying the diff, it is leaking following socket descriptor: > > #v+ > chateau.d.if!abbe:~ % sockstat -64 =C2=A0|fgrep pdns > nobody =C2=A0 pdnsd =C2=A0 =C2=A0 =C2=A038434 3 =C2=A0tcp4 =C2=A0 *:53 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*:* > nobody =C2=A0 pdnsd =C2=A0 =C2=A0 =C2=A038434 4 =C2=A0udp4 =C2=A0 *:* =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *:* > nobody =C2=A0 pdnsd =C2=A0 =C2=A0 =C2=A038434 5 =C2=A0udp4 =C2=A0 *:53 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*:* > #v- > > And with the diff applied: > > #v+ > chateau.d.if!abbe:~ % sockstat -64 =C2=A0|fgrep pdns > nobody =C2=A0 pdnsd =C2=A0 =C2=A0 =C2=A043666 3 =C2=A0tcp4 =C2=A0 *:53 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*:* > nobody =C2=A0 pdnsd =C2=A0 =C2=A0 =C2=A043666 4 =C2=A0udp4 =C2=A0 *:53 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*:* > #v- > > References: > [1] =C2=A0http://people.freebsd.org/~ashish/diffs/pdnsd-sockets-leak.diff Ok, I applied the patch and reinstalled the port. I will leave it running for a few days and report back. So far it's looking good. Thank you very much! :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=T_KLA9mPxzWufGKUuTf4Q2dAm0w59Z9%2BNdbOo>