From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 11 15:57:23 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B3A9F10; Tue, 11 Dec 2012 15:57:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id A87B18FC08; Tue, 11 Dec 2012 15:57:21 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id qBBFvJtI093063; Tue, 11 Dec 2012 19:57:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id qBBFvIHM093062; Tue, 11 Dec 2012 19:57:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 11 Dec 2012 19:57:18 +0400 From: Gleb Smirnoff To: Richard Sharpe Subject: Re: Possible obscure socket leak when system under load and listener is slow to accept Message-ID: <20121211155718.GR48639@FreeBSD.org> References: <50C3D22D.3060008@freebsd.org> <1355015131.6752.12.camel@localhost.localdomain> <50C4475D.9020300@mu.org> <1355075850.6752.15.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <1355075850.6752.15.camel@localhost.localdomain> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@FreeBSD.org, Alfred Perlstein , Andre Oppermann X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2012 15:57:23 -0000 On Sun, Dec 09, 2012 at 09:57:30AM -0800, Richard Sharpe wrote: R> > lsof and sockstat can be helpful. lsof may be able to help determine if R> > there's a leak because it MAY will find sockets not associated with a R> > process. R> > R> > Hope this helps. R> R> Thanks Alfred. After following through the call graph and confirming R> (with the code) that it was correct, I am now pretty convinced that I R> was wrong in assuming that it was a socket leak. You can always check number of socket allocations in kernel via: vmstat -z | grep ^socket | awk '{print $4}' If you can't establish a scenario when the number infinitely grows, then there is no leak. -- Totus tuus, Glebius.