Possible obscure socket leak when system under load and listener is slow to accept

Gleb Smirnoff glebius at FreeBSD.org
Tue Dec 11 15:57:23 UTC 2012


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.


More information about the freebsd-hackers mailing list