From owner-freebsd-questions@FreeBSD.ORG Mon Oct 13 14:38:41 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65F6116A4B3 for ; Mon, 13 Oct 2003 14:38:41 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8913F43F3F for ; Mon, 13 Oct 2003 14:38:40 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h9DLcapX063977; Mon, 13 Oct 2003 16:38:36 -0500 (CDT) (envelope-from dan) Date: Mon, 13 Oct 2003 16:38:36 -0500 From: Dan Nelson To: Mark Message-ID: <20031013213836.GB21069@dan.emsphone.com> References: <200310132105.H9DL5K01086760@asarian-host.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310132105.H9DL5K01086760@asarian-host.net> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-questions@freebsd.org Subject: Re: Do threads conflict? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2003 21:38:41 -0000 In the last episode (Oct 13), Mark said: > I just installed Sendmail::Milter, which I believe uses the ithreads > model for Perl. I created my own Milter (Perl-threaded 5.8.0), and > everything runs fine... Except that now, when the Milter is running, > tinyproxy 1.5.0 goes haywire, filling up its log like crazy with this > message: > > "Accept returned an error (Resource temporarily unavailable) ... retrying." > > The only thing tinyproxy and the Milter have in common, is that they > both use threads. > > Is there perhaps something that prevents both programs from using > threads? Perhaps the threads-enabled version of the daemonized perl > Milter keeps a shared library locked? So, now I can run either one or > the other, but not both. I use this on FreeBSD 4.7R. They shouldn't conflict. That sounds like a libc_r bug; I think the wrapper for accept() should retry the accept() call for the user. You might want to try updating to 4.8; there were a couple of important commits to libc_r that fixed bugs that usually affected threaded daemons: 2002-10-22 09:44 fjoe don't allow the uthread kernel pipe to use the same descriptors as stdio 2003-06-03 09:09 ru fix for a stale stdio descriptors flags bugs. -- Dan Nelson dnelson@allantgroup.com