From owner-freebsd-stable@FreeBSD.ORG Wed Jun 13 16:50:16 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 83CB316A480 for ; Wed, 13 Jun 2007 16:50:16 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.230]) by mx1.freebsd.org (Postfix) with ESMTP id 358DD13C447 for ; Wed, 13 Jun 2007 16:50:15 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so202983wra for ; Wed, 13 Jun 2007 09:50:15 -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:mime-version:content-type:content-transfer-encoding:content-disposition; b=OpGp8iFsgYjyS+LcPjsPhPwY2unXul6xTNMhOBvEScM/Cq2IvuOpW2hvE6AxB5i17TwDeMAZC9Hc/vkhpdIq+XIZuOfZsAx2PWxU6i1rhjxYQoG7s6tN6v0vlg/romRq8j1EBBm4jZ9HY4AIlHX5p9nOhKoekM1cqoqOBMD6AHU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=BJZbWtxzbmQA3w2nnMzDEOX96uU79hAnGNUiveGnoy5gF5uw3eGTtTDS6zwpS2i8tnUtaLkbOeAqM7A/P5kJ6wDzUxpWrDKkfsk9lPvRy1CU++NqeuEgs4m3ML+C9fHXwAvco/sogw8BBTxobgK2hXELYcsCO4M8u70ojawxOLQ= Received: by 10.78.130.6 with SMTP id c6mr295807hud.1181753414696; Wed, 13 Jun 2007 09:50:14 -0700 (PDT) Received: by 10.78.174.6 with HTTP; Wed, 13 Jun 2007 09:50:14 -0700 (PDT) Message-ID: <7ad7ddd90706130950v48686221t5f27945607789c94@mail.gmail.com> Date: Wed, 13 Jun 2007 18:50:14 +0200 From: "Ulrich Spoerlein" To: stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 16:50:16 -0000 On 6/13/07, Ivan Voras wrote: > Can you perhaps isolate the bug / give more information on it? I'm > asking because I'm currently using an application with unix domain > sockets in production wich handles lots of connects/disconnects per > second and it doesn't seem to show leakage. Ok, I'm not exactly sure what I should do. First of all, there are two LDAP consumers: postfix and cyrus-saslauthd. A fairly common setup, I suppose. If I bombard this setup with hundreds of mails, cyrus is at one point unable to process the mails further, stating that: Jun 13 18:27:22 misctest1 lmtpunix[47460]: IOERROR: opening /data/cyrus/spool/user/ulrspoe/cyrus.cache: Too many open files The error is misleading, though, as it is not cyrus that is out of file descriptors, but rather OpenLDAP. Restarting slapd will make cyrus work again. I logged the lsof output during the mail bomb and the slapd-lines are continually rising: 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 60;done Wed Jun 13 18:21:55 CEST 2007 1378 71 272 Wed Jun 13 18:22:57 CEST 2007 1378 71 272 Wed Jun 13 18:23:58 CEST 2007 1378 216 316 Wed Jun 13 18:24:59 CEST 2007 1378 321 644 Wed Jun 13 18:26:01 CEST 2007 1378 333 1132 Wed Jun 13 18:27:02 CEST 2007 1378 329 1804 Wed Jun 13 18:28:04 CEST 2007 1378 417 2280 The third column never goes down significantly. I have the setup now sitting at 2k open files for the slapd process and will wait until tomorrow, if the count ever decreases again. Changing from ldapi://%2fvar%2frun%2fopenldap%2fldapi/ to ldap://127.0.0.1/ "fixes" the problem. It might be a genuine problem in OpenLDAP, though. We are using openldap-server-2.3.34_1 Cheers, Uli