Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2007 20:15:56 +0200
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        "Marc G. Fournier" <freebsd@hub.org>
Cc:        Jeremy Chadwick <koitsu@FreeBSD.org>, rwatson@FreeBSD.org, stable@FreeBSD.org
Subject:   Re: Unix domain socket leak in 6-STABLE
Message-ID:  <20070613181555.GA1506@roadrunner.q.local>
In-Reply-To: <7EEECFAE63E9B976653B3254@ganymede.hub.org>
References:  <7EEECFAE63E9B976653B3254@ganymede.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Marc G. Fournier wrote:
> 'k, just to ring in here ... I can definitely attest to there being a leak 
> here, as it was me that was originally burned by it ... in my case, I 
> eventually was able to isolate which VPS/jail was causing it and haven't run it 
> since, but was never able to determine exactly what was causing it, since there 
> wasn't really anything unusual running in that jail :(
> 
> But ... based on the discussions that were had at the time, it was my 
> understanding that if all applications were shut down on the server (to the 
> bare minimal), eventually the kernel GC should clean up all residual sockets 
> ... when I did this (shut down all applications but the very bare minimum) and 
> waited for 10+ minutes, socket usage never drop'd below about 4k sockets in 
> use, or something like that ...

Hi Marc,

was your leak a "kernel leak" or a "user leak" (if it actually makes a
difference). Because I'm only hitting the problem within the slapd
process itself. Restart it, every thing is good again. Other
applications are also no affected.

I think what's happening to me, is that slapd keeps unix domain sockets
lingering too long. When blasting mails through the system, all those
tiny ldap lookups then lead to slapd reaching it's process limit.

I wonder though: maxfilesperproc is roughly 12k, but lsof needs to only
count 2.5k lines of slapd output when the limit is hit. Is there
a better way to check, how much fds/resources are open by a certain process?

When using TCP sockets, the number of open files hardly changes.

Ulrich Spoerlein
-- 
"The trouble with the dictionary is you have to know how the word is
spelled before you can look it up to see how it is spelled."
-- Will Cuppy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070613181555.GA1506>