Date: Tue, 15 Feb 2011 17:26:56 +0530 From: ashish@freebsd.org (Ashish SHUKLA) To: Marius =?utf-8?Q?N=C3=BCnnerich?= <marius@nuenneri.ch> Cc: Ashish SHUKLA <ashish@freebsd.org>, freebsd-ports@freebsd.org Subject: Re: pdnsd leaking udp sockets Message-ID: <86oc6dzf1z.fsf@chateau.d.if> In-Reply-To: <AANLkTin=8BN6rEVH=XSFPFS7DZmxvTPZvqzK=912dhOY@mail.gmail.com> ("Marius =?utf-8?Q?N=C3=BCnnerich=22's?= message of "Tue, 15 Feb 2011 12:04:29 %2B0100") References: <AANLkTimtGzJSXDGG8JeOvuUWEEMXoKP6JN13CRFu6Cdn@mail.gmail.com> <86bp2d1wit.fsf@chateau.d.if> <AANLkTin=8BN6rEVH=XSFPFS7DZmxvTPZvqzK=912dhOY@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 fixed that. You can test the diff[1] to see if it fixes issue you're experiencing. To reproduce this at my end, I switched to 'resolv.conf' server method and commented 'server_ip' in the pdnsd.conf(5). Following are the contents of t= he 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 |fgrep pdns nobody pdnsd 38434 3 tcp4 *:53 *:* nobody pdnsd 38434 4 udp4 *:* *:* nobody pdnsd 38434 5 udp4 *:53 *:* #v- And with the diff applied: #v+ chateau.d.if!abbe:~ % sockstat -64 |fgrep pdns nobody pdnsd 43666 3 tcp4 *:53 *:* nobody pdnsd 43666 4 udp4 *:53 *:* #v- References: [1] http://people.freebsd.org/~ashish/diffs/pdnsd-sockets-leak.diff HTH =2D-=20 Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 freebsd.org!ashish | http://people.freebsd.org/~ashish/ Avoid Success At All Costs !! --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQIcBAEBCgAGBQJNWmoMAAoJEMdGz6nnT6SwWQUP/A/Tw6enoje3of59fd0PhT9Y qvqXHY5YHYKN2hfoA08n0FZwd+dFTTQPCi3Zow47GDAN9S4d2DIBAiqHuliqU1LJ r+afKCSmc3RosIb+Rv3QALCgUVFp3bRy3tBiZdKkjGN/NsJEN5azL9C8zp3JOL8Z RZ56NV32b1AFweIJfXWPlmrpZ5yYWGLdHo40/j/8af5pbDkyXRL3esznhaMw7l4A 9d5MLc1afGhN0UZykABZkaS/XGwIYIX/4Dnu/L6uIyr7bFab+K1DuFiPSj9b1Iu1 NxMeLJ9sEa6pvVcNpwmjbc7XKsnS1xvPeMnqu62hSxg5RAk1reHTnwCyyk/bBfeF tc9qjqhG9PvADUdvAgYpqojWzzw/Gr+blVAXD7MBh/9TH66mHgL197tBjhNIkdR5 jHOpAwXEHsyMSosFnhvLJEkQUZfy6KVDidww8r6XDt9dRs6KQp9RxEzT+hqHu5PN h0MUby77EvxkhztXDuKeqTWeOan0hMUNHSUN7S/pJYG6A7jykEDCAs0QOtHbeogG d4tiw1r0HF75JZKZRQ7IOtfWAeh5OUBSLn7XRI9ZaC+vVY7FC4u+ZgUoUzZIdOkC xaBBL7h3Cs5DfYrZ/jgcv3BIOSEGoAUEJln4wC4ZVeDmJZI00HN0vt9YcD+lFTnJ FbPm6Xwnewep0mmOtQ9f =wKoL -----END PGP SIGNATURE----- --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86oc6dzf1z.fsf>