From owner-freebsd-threads@FreeBSD.ORG Wed Feb 21 05:03:19 2007 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B2DE16DC1B for ; Wed, 21 Feb 2007 05:03:19 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0864C13C4E1 for ; Wed, 21 Feb 2007 05:03:13 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.14.0/8.14.0/NETPLEX) with ESMTP id l1L53AF5009056; Wed, 21 Feb 2007 00:03:11 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (mail.ntplx.net [204.213.176.10]); Wed, 21 Feb 2007 00:03:11 -0500 (EST) Date: Wed, 21 Feb 2007 00:03:10 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Martin Blapp In-Reply-To: <20070221020335.Y4139@godot.imp.ch> Message-ID: References: <20070220153632.E4139@godot.imp.ch> <20070220174221.B4139@godot.imp.ch> <20070220190347.C4139@godot.imp.ch> <20070220225303.V4139@godot.imp.ch> <20070220234734.H4139@godot.imp.ch> <20070221000830.V4139@godot.imp.ch> <20070221020335.Y4139@godot.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: rob@debank.tv, freebsd-threads@freebsd.org Subject: Re: 6.2-Release and Clamd 0.90 with libpthread.so X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2007 05:03:19 -0000 On Wed, 21 Feb 2007, Martin Blapp wrote: >> Sigh, >> >>> >>> Useing daemon(3) instead of fork seems to fix the problem. >> >> Of course deamon(3) calls fork, and after a short time I >> had again the same ktrace output and CPU usage. > > Using daemon(3) works some times, but from time to time > I see then again the old behaviour, looping kse calls > and some forks(). > > I wonder why those calls never happen in the libthr > and libc_r cases. libc_r and libthr don't have to kse initialization and have different locking. Regardless, I think the code (clamd) is wrong. There is no guarantee that fork() from threaded application will work for libthr and libc_r either. If clamd needs to daemonize, it can always exec() itself with an added argument that means "I've already fork()'d, don't fork() again". -- DE