From owner-freebsd-ports@FreeBSD.ORG Tue Feb 15 11:57:04 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from chateau.d.if (localhost [IPv6:::1]) by hub.freebsd.org (Postfix) with ESMTP id D6A3C106566C; Tue, 15 Feb 2011 11:57:02 +0000 (UTC) (envelope-from ashish@freebsd.org) Received: from chateau.d.if (chateau.d.if [IPv6:::1]) by chateau.d.if (Postfix) with ESMTP id D81BF45612; Tue, 15 Feb 2011 17:27:00 +0530 (IST) From: ashish@freebsd.org (Ashish SHUKLA) To: Marius =?utf-8?Q?N=C3=BCnnerich?= Organization: The FreeBSD Project References: <86bp2d1wit.fsf@chateau.d.if> X-Face: )vGQ9yK7Y$Flebu1C>(B\gYBm)[$zfKM+p&TT[[JWl6:]S>cc$%-z7-`46Zf0B*syL.C]oCq[upTG~zuS0.$"_%)|Q@$hA=9{3l{%u^h3jJ^Zl; t7 X-Uptime: 4:48PM up 19:07, 13 users, load averages: 0.19, 0.18, 0.08 X-URL: http://people.freebsd.org/~ashish/ X-Operating-System: FreeBSD/FreeBSD 8.1-RELEASE/amd64 X-OpenPGP-Fingerprint: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 X-Attribution: =?utf-8?B?4KSG4KS24KWA4KS3?= Organisation: The FreeBSD Project Date: Tue, 15 Feb 2011 17:26:56 +0530 In-Reply-To: ("Marius =?utf-8?Q?N=C3=BCnnerich=22's?= message of "Tue, 15 Feb 2011 12:04:29 +0100") Message-ID: <86oc6dzf1z.fsf@chateau.d.if> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (amd64-portbld-freebsd8.1) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEWpqal/f39tbW1jY2Md HR2goKCenp6UlJROTk7////9/f35+fnT09ORJdieAAACVklEQVQ4jXXUP2vbQBQA8AvUTkgz5OzY Z0iGWhpS6BSrkECn0mvx0MEJ6AjtYrfoBCVDlD8naJYmNlRfwZq8+mkKlIZaGpJSYmP7Q/XkJDrJ Td8i/H68u3vHPaPufwLdf32AMA4A6GcAgvAamY1pOJiDIFqicTwLswDhfr3uxfFtkAY/GFHPMwzD 8zpnACmIOnE6js7rQb+v4NJrG9od0C+QgpHMy5jBewV+UDSMWiw1Y4fWfyV7+NGFzDsYa3pth9LJ Q4XvXxFHcJRvHOmygn5NAEabnDcQQguarnfoiwSCJ99jmKKcphsZONmWsDK9Ro7cvZOCtQdg8nje egLhc2LNlkLmsezzTFUUy5w18ocox/f0LaLgJy0zO75zk+9pp85GAj36xjqhdI0y3tq2m4dqqcWX zQWBTz8L1irvolXV4J+3q7eCDgVnttjNq6X8H+9KOZsuNk1uCzx8pSp+E9HImfJOTLdcGqo+YKnG EIovizkEn48V7BO+ch2DXcD4ENSpWiU+q8hjjbgTBZCXnZtyj0Ws4Q1Q0B2WXFtYZo65Bbyeeldw RS6qFueM80LlLA29YlVwGRYvFD+kwI/0O+A2PlpOP9GwslUVciHuYGechuBTp922YiDZCrghTknm XSyOM+D3aoRZlo0Jb42zY7DN4p2x4AeZ+QAYutx1sHwTHzMT5cMNduQ9yW3GczN4KZ86kb0c9O8T yXDeFqpl2fryPEAYGXIlezAPXYh2NgVr/gvdoHIuDwuPwOhcWE8f8mmICq41eATkn8x0kuRTIKcB wE9+/QUtiiAnYcaN7wAAAABJRU5ErkJggg== MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Cc: Ashish SHUKLA , freebsd-ports@freebsd.org Subject: Re: pdnsd leaking udp sockets X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2011 11:57:04 -0000 --=-=-= 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----- --=-=-=--