From owner-freebsd-stable@FreeBSD.ORG Wed Jun 13 19:38:21 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 9C8AC16A468 for ; Wed, 13 Jun 2007 19:38:21 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.224]) by mx1.freebsd.org (Postfix) with ESMTP id 470BD13C46E for ; Wed, 13 Jun 2007 19:38:21 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: by wx-out-0506.google.com with SMTP id h28so262915wxd for ; Wed, 13 Jun 2007 12:38:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=SN/bp+sqIm0rdRhotAL4OFbli7SUHYJSXpTJH+8kWGMuHGdgRss6nGOZ2xC47FnZ/8UFw/keoyTcv6c1YevRVwHmtCcTy6TikMOsRSCXyD5na1ZwGbZ4k+iOpoEsQUrKREBFngnWgPonCACQxL+5u0TuDUG3d7qrJ6Mo+R3m9B8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ojXEMS7KR0ydteo8kGUfjgCP7elkXdYywxs/I8HIscA+X1Vonkv1qo99oP2WRzQY+J/nd5qzG94HBOU4S+1uW2DBB1/FiTWX0YBah9LsrUkQhschs6S+EWpY9uD+Wg0awKOwgT5mK/FYBusO4qs7XNdN5RPe3/hvZ9aT9iT5wL4= Received: by 10.70.87.5 with SMTP id k5mr1546317wxb.1181762060504; Wed, 13 Jun 2007 12:14:20 -0700 (PDT) Received: by 10.70.63.4 with HTTP; Wed, 13 Jun 2007 12:14:20 -0700 (PDT) Message-ID: <8e10486b0706131214m9e04f36rbaf9db859e9e65da@mail.gmail.com> Date: Wed, 13 Jun 2007 16:14:20 -0300 From: "Alexandre Biancalana" To: stable@freebsd.org, rwatson@freebsd.org In-Reply-To: <7ad7ddd90706130722t6731afa7j5fa9a78a3e87f9e5@mail.gmail.com> MIME-Version: 1.0 References: <7ad7ddd90706130722t6731afa7j5fa9a78a3e87f9e5@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: 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 19:38:21 -0000 On 6/13/07, 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. Ohhh !! I had exactly the same problem last night. After change the line of /usr/local/etc/nss_ldap.conf from uri ldap://127.0.0.1/ to uri ldapi://%2fvar%2frun%2fopenldap%2fldapi/ The open sockets off this machine started to increase until reach maxfiles limit and show messages like this: kernel: kern.maxfiles limit exceeded by uid 65534, please see tuning(7). and slapd stopped to accept new connections. During the day (production hours) the number off connections (using TCP sockets) to OpenLDAP range from 16 to 45. Last night after change the type connection to Unix Domain Socket the number of connections raised rapidly to about 4000. I get this numbers using sockstat -c command. This machine is our Samba PDC, running 6.2-STABLE compile in Apr 5 13:33:50 using samba-3.0.24,1, nss_ldap-1.255, openldap-server-2.3.34_1 I can provide more information if need. Any Advises/Patches ? Best Regards, Alexandre Biancalana