From owner-freebsd-stable@FreeBSD.ORG Wed Jun 13 16:17:36 2007 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C993A16A468 for ; Wed, 13 Jun 2007 16:17:36 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id B92F913C457 for ; Wed, 13 Jun 2007 16:17:36 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id A22631CC04E; Wed, 13 Jun 2007 09:17:36 -0700 (PDT) Date: Wed, 13 Jun 2007 09:17:36 -0700 From: Jeremy Chadwick To: Ulrich Spoerlein Message-ID: <20070613161736.GA16117@eos.sc1.parodius.com> Mail-Followup-To: Ulrich Spoerlein , stable@freebsd.org, rwatson@freebsd.org References: <7ad7ddd90706130722t6731afa7j5fa9a78a3e87f9e5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ad7ddd90706130722t6731afa7j5fa9a78a3e87f9e5@mail.gmail.com> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: stable@freebsd.org, rwatson@freebsd.org Subject: Re: Unix domain socket leak in 6-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2007 16:17:36 -0000 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 |