Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Apr 2004 12:20:00 +0200
From:      Eivind Olsen <eivind@aminor.no>
To:        freebsd-questions@freebsd.org
Subject:   Re: A night with threads and gdb
Message-ID:  <18840991.1080822000@[10.122.7.143]>
In-Reply-To: <4069A381.4020206@netfence.it>
References:  <4069A381.4020206@netfence.it>

next in thread | previous in thread | raw e-mail | index | archive | help
--On 30. mars 2004 17:42 +0100 Andrea Venturoli 
<andrea.venturoli@netfence.it> 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
<eivind@aminor.no>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18840991.1080822000>