From owner-freebsd-stable@FreeBSD.ORG Tue Jul 29 11:37:03 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B339137B408 for ; Tue, 29 Jul 2003 11:37:03 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E58843FAF for ; Tue, 29 Jul 2003 11:37:02 -0700 (PDT) (envelope-from freebsd-stable@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19hZLA-0003uO-00 for ; Tue, 29 Jul 2003 20:36:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19hZL7-0003tw-00 for ; Tue, 29 Jul 2003 20:36:49 +0200 From: othermark Date: Tue, 29 Jul 2003 18:36:49 +0000 (UTC) Lines: 98 Message-ID: X-Complaints-To: usenet@main.gmane.org User-Agent: slrn/0.9.7.4 (FreeBSD) Sender: news Subject: stable libmilter leaks kqueue descriptors? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jul 2003 18:37:04 -0000 A few weeks back I upgraded my mail server to -STABLE from a 4.2-STABLE incarnation that had been running for years. Part of recompiling everything on the box involved disassociating my use of the sendmail port I was using and to use the base sendmail in -STABLE. -STABLE builds with libmilter, so I simply recompiled one of my milter clients with the milter headers, objs, etc that were produced from buildworld. However, now I notice that the client (dccm in this case -- www.rhyolite.com/dcc ) slowly uses all the descriptors on the box and must be restarted. I started logging it's use of descriptors over time via a shell script and lsof, and found that it's leaking kqueue descriptors. Has anyone: 1. noticed this problem with other libmilter linked clients that you may be running. 2. have some ideas on how to track down this leakage? I've looked at the dccm source and it seems to be using milter correctly (as it was working fine with an older version of sendmail), but maybe other excellent users have tracked down kqueue leakage before. 3. was a new kqueue enabled libmilter introduced in the 8.x series of upgrades of sendmail? Here's a log excerpt, notice how the fd's for the sockets stay the same, but the kqueue descriptors grow out of hand: Wed Jul 16 15:24:09 PDT 2003 total fd: 78 kqueue fd: 56 ipv4 fd: 3 ps: dcc 21265 0.0 2.0 4004 3084 ?? Ss 12:10PM 0:01.25 /var/dcc/libexec/dccm -l log -t CMN,5,10 -w whiteclnt Wed Jul 16 15:41:28 PDT 2003 total fd: 78 kqueue fd: 56 ipv4 fd: 3 ps: dcc 21265 0.0 2.0 4004 3084 ?? Ss 12:10PM 0:01.36 /var/dcc/libexec/dccm -l log -t CMN,5,10 -w whiteclnt Wed Jul 16 16:17:36 PDT 2003 total fd: 109 kqueue fd: 87 ipv4 fd: 3 ps: dcc 21265 0.0 1.9 4004 3072 ?? Ss 12:10PM 0:01.64 /var/dcc/libexec/dccm -l log -t CMN,5,10 -w whiteclnt Wed Jul 16 18:36:17 PDT 2003 total fd: 137 kqueue fd: 115 ipv4 fd: 3 ps: dcc 21265 0.0 2.0 4004 3080 ?? Ss 12:10PM 0:02.34 /var/dcc/libexec/dccm -l log -t CMN,5,10 -w whiteclnt Wed Jul 16 20:36:41 PDT 2003 total fd: 165 kqueue fd: 143 ipv4 fd: 3 ps: dcc 21265 0.0 2.0 4004 3080 ?? Ss 12:10PM 0:02.95 /var/dcc/libexec/dccm -l log -t CMN,5,10 -w whiteclnt Thu Jul 17 01:17:06 PDT 2003 total fd: 193 kqueue fd: 171 ipv4 fd: 3 ps: dcc 21265 0.0 2.0 4004 3084 ?? Ss 12:10PM 0:04.16 /var/dcc/libexec/dccm -l log -t CMN,5,10 -w whiteclnt --- Mark atkin901 at NOSPAM yahoo dot com (!wired)?(coffee++):(wired);