Re: Segfault problem [long]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/7/06, Daniel A. Ramaley <daniel.ramaley@xxxxxxxxx> wrote:
Hello. I have been struggling for a few months to solve a problem with
an Apache web server. First i'll try to describe the symptoms, then
give details about the configuration and what i have tried so far. I
would greatly appreciate any suggestions on how to diagnose and correct
the problem.


Symptom 1:

After starting Apache during periods of high load the server appears to
run fine for awhile ("awhile" is highly variable but on the order of 90
minutes) then starts returning empty pages. When the empty pages start,
Apache's error_log gets filled with lines like this:

First:
Hmm.. as noted in your post you are using apache2, what process method
are you using?
 prefork
 worker
 perchild

if you have anything other than prefork, change your apache config to
use prefork. ( this is a very common issue with random highload random
crashes).

Second:
if that doesn't work and you dont need anything special with what
apache2 brings you, try apache 1.x



[Thu Sep 07 09:09:11 2006] [notice] child pid 3579 exit signal
Segmentation fault (11), possible coredump in /etc/httpd/core

These errors are very intermittent during periods of light load. I have
had CoreDumpDirectory defined for awhile and have amassed quite a
collection of core files. This is the first few lines of what gdb
reports for one of them:

(gdb) bt
#0  0x0000002a99ff2492 in preg_replace_impl (ht=Variable "ht" is not
available.)
    at /usr/src/redhat/BUILD/php-4.3.9/ext/pcre/php_pcre.c:1154
#1  0x0000002a9a0ac255 in execute (op_array=0x552afe2798)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1640
#2  0x0000002a9a0a9386 in execute (op_array=0x552aff7fb8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684
#3  0x0000002a9a0a9386 in execute (op_array=0x552b0e26c8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684
#4  0x0000002a9a0a9386 in execute (op_array=0x552af80db8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684

Symptom 2:

A further symptom of problems is found in PostgreSQL's logs. The web
applications the server runs rely on PostgreSQL, which logs several
times per minute messages like this:

Sep  7 10:16:09 sun12 postgres[7411]: [1-1] LOG:  unexpected EOF on
client connection

PostgreSQL is configured to accept 256 connections, twice as many
children as Apache should spawn.


Configuration:

The server is a Sun v40z, which is a dual Opteron box with 2 GB RAM. It
is running Red Hat Linux Enterprise AS 4.4 64-bit, with Apache 2.0.52,
PHP 4.3.9, and eAccelerator 0.9.4. The server's purpose is to run Horde
and Imp, with the latest versions of those packages and a few other
Horde components (Ingo, Passwd, and Turba).


I suppose the best thing to look for is to find a small sniplet of
code that you can reproduce the segfault and see if php 4.x and apache
2.x segfault on other systems with that setup.


otherwise there are just to many variables that could cause the
segfault it is a hard thing to trace.



Curt

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux