Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2007 09:17:36 -0700
From:      Jeremy Chadwick <koitsu@FreeBSD.org>
To:        Ulrich Spoerlein <uspoerlein@gmail.com>
Cc:        stable@freebsd.org, rwatson@freebsd.org
Subject:   Re: Unix domain socket leak in 6-STABLE
Message-ID:  <20070613161736.GA16117@eos.sc1.parodius.com>
In-Reply-To: <7ad7ddd90706130722t6731afa7j5fa9a78a3e87f9e5@mail.gmail.com>
References:  <7ad7ddd90706130722t6731afa7j5fa9a78a3e87f9e5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 13, 2007 at 04:22:45PM +0200, Ulrich Spoerlein wrote:
>  Hi,
> 
>  as you are aware, there is a unix domain socket leak in 6-STABLE,
>  which AFAIK is not yet fully fixed.
> 
>  I wanted to ask about the status or some possible fixes, as I know a
>  way to reproduce the problem in a matter of minutes.
> 
>  We are running Cyrus and Postfix with the user DB in OpenLDAP. When
>  using ldapi://%2fvar%2frun%2fopenldap%2fldapi/ as a connection URL for
>  both Postfix' user lookup and cyrus' user lookup (via nss_ldap). slapd
>  quickly runs out of filedescriptors as it is not closing any unix
>  sockets (judging by ever increasing lsof output).
> 
>  Using TCP sockets is just fine. If there are patches I could try,
>  don't hesitate to send them to me.

Might be a red herring, but worth mentioning as a possibility:

I've seen this kind of problem with domain sockets (at least on Linux
with a multi-use tool called busybox) where on error conditions the
code never bothered to close the existing socket it opened, thus
resulting in leaks/resource exhaustion over time.  The code later got
fixed, but a pretty nasty bug especially when the program is used in
a lot of embedded products...

In regards to FreeBSD, I remember reading some mails from Robert Watson
last month in regards to UNIX domain socket code changes:

http://monkey.org/freebsd/archive/freebsd-stable/200705/msg00200.html

-- 
| Jeremy Chadwick                                    jdc at parodius.com |
| Parodius Networking                           http://www.parodius.com/ |
| UNIX Systems Administrator                      Mountain View, CA, USA |
| Making life hard for others since 1977.                  PGP: 4BD6C0CB |




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