From owner-freebsd-questions@FreeBSD.ORG Thu Apr 1 02:20:08 2004 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 278F216A4CE for ; Thu, 1 Apr 2004 02:20:08 -0800 (PST) Received: from vimes.aminor.no (vimes.aminor.no [213.187.177.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91BA943D39 for ; Thu, 1 Apr 2004 02:20:07 -0800 (PST) (envelope-from eivind@aminor.no) Received: from localhost (localhost.eivind [127.0.0.1]) by vimes.aminor.no (Postfix) with ESMTP id ABF991789B for ; Thu, 1 Apr 2004 12:20:05 +0200 (CEST) Received: from vimes.aminor.no ([127.0.0.1]) by localhost (vimes.eivind [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 84720-09 for ; Thu, 1 Apr 2004 12:20:01 +0200 (CEST) Received: from [10.122.7.143] (nextra-3-244.nextra.no [148.122.3.244]) by vimes.aminor.no (Postfix) with ESMTP id 891821788F for ; Thu, 1 Apr 2004 12:20:01 +0200 (CEST) Date: Thu, 01 Apr 2004 12:20:00 +0200 From: Eivind Olsen To: freebsd-questions@freebsd.org Message-ID: <18840991.1080822000@[10.122.7.143]> In-Reply-To: <4069A381.4020206@netfence.it> References: <4069A381.4020206@netfence.it> X-Mailer: Mulberry/3.1.2 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at aminor.no Subject: Re: A night with threads and gdb 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: Thu, 01 Apr 2004 10:20:08 -0000 --On 30. mars 2004 17:42 +0100 Andrea Venturoli wrote: > _ apache 2.0 with default prefork MPM will start, but will chew up all > cpu time after a while; using "httpd -DSSL -X" > shows that the server dies when nocc is used to forward a mail; no need > to say that it's a problem with threads, the > exact message being > > Fatal error 'Unable to read from thread kernel pipe' at line 1100 in > file /usr/src/lib/libc_r/uthread/uthread_kern.c (errno = 0) I saw the same problem with Apache 2.0.49 + PHP 4.3.5 on FreeBSD 5.2.1-p4. I posted on freebsd-current about the same "Unable to read from thread kernel pipe" but didn't get any response (apart from being told to not run PHP + Apache2 together). When I recompiled the kernel using SCHED_ULE instead of the default SCHED_4BSD this fault message went away (I can't say if it was _caused_ by the change in scheduler since I also tried some other things to fix this at the time) but Apache still hangs / starts consuming all the CPU now and then. I've now been running Apache 2.0.49 + PHP 4.3.5 for nearly two hours without any obvious problems, but it might be too early to say if this is working stable or not. If we assume that things finally are stable here, these are the changes I've done locally to get to this point. I don't know which (if any...) of these really helped or not as that requires more testing. - I'm using a more or less plain GENERIC kernel but now with SCHED_ULE instead of SCHED_BSD (other changes are to include IPFILTER in kernel) - PHP 4.3.5 is using PCRE from PHP 4.3.4 - PHP is now compiled without support for LDAP and DOMXML Apache is (and always was) running in prefork-mode. -- Regards / Hilsen Eivind Olsen