From owner-freebsd-stable@FreeBSD.ORG Thu Jun 14 07:38:28 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 A12D616A46D for ; Thu, 14 Jun 2007 07:38:28 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by mx1.freebsd.org (Postfix) with ESMTP id 4D4F413C4BE for ; Thu, 14 Jun 2007 07:38:28 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so373935wra for ; Thu, 14 Jun 2007 00:38:27 -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:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=GeYSdC4noIynCkoORhVve+8j4W6II5QQXHw9LFOQ+dT8A/OeZRoEgLOkasUkmIW+/4cgV5texvPSB8gkeEBEggxwHzDbc2lmFFjx150sXO2Gwp5hdKl+FqL6rCb2IMd6vkpbkFKkkNRmFJnrIMHdvrvcLhpNxPe1T4RF44hd5TI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=IWGg0MWnimXYAxfRxNJf4YkkNYvVl7obE/9MipV8z8helGk5Wrfq7T14AL2HazEhQZQkiYPbHwpJOPA4h22mjb6EqsQLKqZE6F9QAmJbyChS19MEwOf9kg/J3W6LeTgYB4cT90AnmnF2F6LYaUFELexOqncvFry8Pfr6SFlw3GY= Received: by 10.78.170.6 with SMTP id s6mr546619hue.1181806706949; Thu, 14 Jun 2007 00:38:26 -0700 (PDT) Received: by 10.78.171.8 with HTTP; Thu, 14 Jun 2007 00:38:26 -0700 (PDT) Message-ID: <7ad7ddd90706140038r6b1cf9emb4f3bd2e46fcbb16@mail.gmail.com> Date: Thu, 14 Jun 2007 09:38:26 +0200 From: "Ulrich Spoerlein" To: "Alexandre Biancalana" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: stable@freebsd.org, Alfred Perlstein , rwatson@freebsd.org Subject: Re: OpenLDAP unix domain socket leak 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: Thu, 14 Jun 2007 07:38:28 -0000 On 6/14/07, Alexandre Biancalana wrote: > I change nss_ldap.conf again to access OpenLDAP via unix domain socket. > > Here is the connection counter before the change: > > Wed Jun 13 22:35:55 BRT 2007 > unix sockets: 99 > tcp sockets: 12 > > > Here is the connection counter rigth before change connection method back to > TCP socket: > > Wed Jun 13 22:56:01 BRT 2007 > unix sockets: 2902 > tcp sockets: 13 Hi, It looks like it is not actually a leak, per se. Letting slapd sit there idly for a while, it starts to close the unix domain sockets. However, if you constantly hit it with requests, it never recuperates. misctest1# while :; do echo -n `date` " "; lsof 2>/dev/null | awk '$1 ~ /imapd/{imapd+=1} $1 ~ /slapd/{slapd+=1} $3 ~ /postfix/{pf+=1} END{print imapd, pf, slapd}'; sleep 15;done Thu Jun 14 09:27:58 CEST 2007 1354 46 228 Thu Jun 14 09:28:13 CEST 2007 1354 341 516 Thu Jun 14 09:28:29 CEST 2007 1354 325 868 Thu Jun 14 09:28:45 CEST 2007 1308 337 1192 Thu Jun 14 09:29:01 CEST 2007 1308 323 1192 Thu Jun 14 09:29:17 CEST 2007 1308 337 1457 Thu Jun 14 09:29:33 CEST 2007 1308 323 1520 Thu Jun 14 09:29:49 CEST 2007 1262 321 1748 Thu Jun 14 09:30:04 CEST 2007 1262 329 1979 Thu Jun 14 09:30:20 CEST 2007 1262 333 2316 Thu Jun 14 09:30:37 CEST 2007 1262 333 2580 Thu Jun 14 09:30:53 CEST 2007 1262 335 3044 Thu Jun 14 09:31:09 CEST 2007 1262 393 3164 Thu Jun 14 09:31:25 CEST 2007 1262 393 2420 Thu Jun 14 09:31:41 CEST 2007 1262 395 2556 Thu Jun 14 09:31:57 CEST 2007 1262 393 2556 Thu Jun 14 09:32:13 CEST 2007 1262 393 2556 Thu Jun 14 09:32:29 CEST 2007 1262 391 2556 Thu Jun 14 09:32:45 CEST 2007 1262 391 2556 Thu Jun 14 09:33:01 CEST 2007 1262 391 888 Thu Jun 14 09:33:16 CEST 2007 1262 385 888 Thu Jun 14 09:33:32 CEST 2007 1262 94 228 Thu Jun 14 09:33:48 CEST 2007 1262 94 228 I think we really should take this up with the OpenLDAP guys. Btw, why is lsof printing lines multiple times? I ran lsof through sort and get almost every line four times: slapd 94403 ldipr 515u unix 0xc8f68000 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 515u unix 0xc8f68000 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 515u unix 0xc8f68000 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 515u unix 0xc8f68000 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 516u unix 0xc8f13858 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 516u unix 0xc8f13858 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 516u unix 0xc8f13858 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 516u unix 0xc8f13858 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 517u unix 0xc8f35000 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 517u unix 0xc8f35000 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 517u unix 0xc8f35000 0t0 /var/run/openldap/ldapi slapd 94403 ldipr 517u unix 0xc8f35000 0t0 /var/run/openldap/ldapi Uli