From owner-freebsd-stable@FreeBSD.ORG Wed Jun 13 18:16:07 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 3346616A468 for ; Wed, 13 Jun 2007 18:16:07 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 7A0DF13C489 for ; Wed, 13 Jun 2007 18:16:06 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by ug-out-1314.google.com with SMTP id u2so506173uge for ; Wed, 13 Jun 2007 11:16:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=A+kqHFOhIBSu0GWMavmVDLs00G6Klb52NAXWxcYT8e7MLMJTlYKJzE7IWdFLQvwWMh6BRIq7+hR+wzcXlwa2P8B42k4t9r0Scgd4eDJy6yX7ySH5iRRvEEJ9RFc+gHCjFHM+WUHUK3m/gmPMrGaDalvmQkq7BBc/BVR1ZslVJEE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=d+KkkD/A+rpS0ItxEB2/yc2Kg4OOZu/P+uSFR27V4oMUaxizOhJMvfHuug0YATkveSMM9io3jrGJ8nX6RiHCY9B6ShXYny2D06ZpLyoPT5sk/xaFgLopQ/N06IRwR1TO9MbAU/G8wN1N9yR15SRIWSCaS/5loBlcgFG22yQ7wnk= Received: by 10.66.243.4 with SMTP id q4mr1437582ugh.1181758565049; Wed, 13 Jun 2007 11:16:05 -0700 (PDT) Received: from roadrunner.q.local ( [85.180.147.166]) by mx.google.com with ESMTP id k1sm3285316ugf.2007.06.13.11.16.02 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jun 2007 11:16:04 -0700 (PDT) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.14.1/8.14.1) with ESMTP id l5DIFv5D002502; Wed, 13 Jun 2007 20:15:57 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.14.1/8.14.1/Submit) id l5DIFuj9002501; Wed, 13 Jun 2007 20:15:56 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Wed, 13 Jun 2007 20:15:56 +0200 From: Ulrich Spoerlein To: "Marc G. Fournier" Message-ID: <20070613181555.GA1506@roadrunner.q.local> Mail-Followup-To: "Marc G. Fournier" , Jeremy Chadwick , stable@freebsd.org, rwatson@freebsd.org References: <7EEECFAE63E9B976653B3254@ganymede.hub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7EEECFAE63E9B976653B3254@ganymede.hub.org> Cc: Jeremy Chadwick , rwatson@FreeBSD.org, stable@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 18:16:07 -0000 Marc G. Fournier wrote: > 'k, just to ring in here ... I can definitely attest to there being a leak > here, as it was me that was originally burned by it ... in my case, I > eventually was able to isolate which VPS/jail was causing it and haven't run it > since, but was never able to determine exactly what was causing it, since there > wasn't really anything unusual running in that jail :( > > But ... based on the discussions that were had at the time, it was my > understanding that if all applications were shut down on the server (to the > bare minimal), eventually the kernel GC should clean up all residual sockets > ... when I did this (shut down all applications but the very bare minimum) and > waited for 10+ minutes, socket usage never drop'd below about 4k sockets in > use, or something like that ... Hi Marc, was your leak a "kernel leak" or a "user leak" (if it actually makes a difference). Because I'm only hitting the problem within the slapd process itself. Restart it, every thing is good again. Other applications are also no affected. I think what's happening to me, is that slapd keeps unix domain sockets lingering too long. When blasting mails through the system, all those tiny ldap lookups then lead to slapd reaching it's process limit. I wonder though: maxfilesperproc is roughly 12k, but lsof needs to only count 2.5k lines of slapd output when the limit is hit. Is there a better way to check, how much fds/resources are open by a certain process? When using TCP sockets, the number of open files hardly changes. Ulrich Spoerlein -- "The trouble with the dictionary is you have to know how the word is spelled before you can look it up to see how it is spelled." -- Will Cuppy