Socket leak (Was: Re: What triggers "No Buffer Space) Available"?

Marc G. Fournier scrappy at freebsd.org
Fri May 4 14:05:45 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- --On Friday, May 04, 2007 12:05:11 +0100 Robert Watson <rwatson at FreeBSD.org> 
wrote:

> I think we should be careful to avoid prematurely drawing conclusions about
> the source of the problem.  First question: have you confirmed that the
> resource limit on sockets is definitely what is causing the error you're
> seeing?  I.e., does the number of sockets hit the maximum sockets?

'k, so, based on your other email this morning, about sockstat | stream, I'm 
now keeping an eye on:

# uptime ; netstat -nA | grep -c stream ; sockstat -u | grep -c stream ; sysctl 
kern.ipc.numopensockets ; sysctl kern.ipc.maxsockets
 8:59AM  up 1 day,  9:57, 7 users, load averages: 1.63, 4.92, 5.12
6877
2323
kern.ipc.numopensockets: 8463
kern.ipc.maxsockets: 12328

I'm at least 24 hours out from the error(s) starting to happen ...

> Second point: there are two kinds of resource leaks that seem likely
> candidates for a socket resource exhaustion problem. First, kernel bugs, in
> which the kernel maintains objects despite there being no application
> references, and second, application reference leaks, in which applications
> keep references to kernel objects despite no longer needing them.  Our
> immediate goal is to determine which of these is the case: is it a kernel
> bug, or an application bug?  Using tools like netstat and sockstat, we can
> try and determine if all kernel sockets are properly referenced.  Experience
> suggests that it is an application bug, but we shouldn't rule out a kernel
> bug; the good news is that the tools to use in the debugging process are
> identical at this stage.

'k, in preparation for it starting, so that I can reboot as quickly as 
possible, but get max information ... do I just want to save the output of 
'sockstat -u' and 'netstat -nA', or is there something else that will be useful?

- ----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email . scrappy at hub.org                              MSN . scrappy at hub.org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFGOz294QvfyHIvDvMRAsy6AKCme99kb27uIHrgLC53fVCZrqKkSgCgheFR
2DYk1DPdmAGzoJhqAXpt+Sc=
=G1NF
-----END PGP SIGNATURE-----



More information about the freebsd-stable mailing list