From owner-freebsd-stable@FreeBSD.ORG Fri Aug 8 06:37:05 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 D9C5237B401 for ; Fri, 8 Aug 2003 06:37:05 -0700 (PDT) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CB3C43F3F for ; Fri, 8 Aug 2003 06:37:04 -0700 (PDT) (envelope-from andre.albsmeier@siemens.com) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.11.7/8.11.7) with ESMTP id h78Daxx18557; Fri, 8 Aug 2003 15:36:59 +0200 (MEST) Received: from mars.cert.siemens.de (ust.mchp.siemens.de [139.23.201.17]) by mail2.siemens.de (8.11.7/8.11.7) with ESMTP id h78DawM14000; Fri, 8 Aug 2003 15:36:58 +0200 (MEST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) 1.46 2003/05/28 09:28:32 ust Exp $) with ESMTP id h78DawtQ090637; Fri, 8 Aug 2003 15:36:58 +0200 (CEST) Received: (from localhost) by curry.mchp.siemens.de (8.12.9/8.12.9) id h78Daw9F003511; Date: Fri, 8 Aug 2003 15:36:57 +0200 From: Andre Albsmeier To: othermark Message-ID: <20030808133657.GA42855@curry.mchp.siemens.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Echelon: BITNET, NSA, Defcon, president, cocaine X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.4i cc: freebsd-stable@freebsd.org Subject: Re: 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: Fri, 08 Aug 2003 13:37:06 -0000 On Wed, 30-Jul-2003 at 15:46:24 +0000, othermark wrote: > In article , othermark wrote: > > 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. > > I found this pr, which seems to be a likely candidate. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/55007 > > dccm is threaded, but libmilter does not call kqueue directly, but > based on other searches, I'm suspecting that various calls are > implemented using kqueue, kevent (select(), poll(), etc..). I see > some evidence of this in the sources, but I'm not familiar enough > with the kernel code to say absolutely that these code paths are > executed. I have a self-written milter app. Today I upgraded to the recent -STABLE and now it eats KQUEUE filedscriptors like crazy. I tried to MFC the fix in lib/libc_r/uthread/uthread_kqueue.c but I always get complaints about multiple definition of `_kqueue': building shared library libc_r.so.4 kqueue.So: In function `_kqueue': kqueue.So(.text+0x14): multiple definition of `_kqueue' uthread_kqueue.So(.text+0x0): first defined here *** Error code 1 Seems it conflicts with /usr/obj/lib/libc_r/kqueue.S which is generated everytime from scratch during the build. I assume that I have to add kqueue.o to HIDDEN_SYSCALLS but I am not sure if this is correct and what it will break :-) -Andre