logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: child pid xxxx exit signal segmentatino fault
Author
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Wed 09 Sep '09 23:55    Post subject: child pid xxxx exit signal segmentatino fault Reply with quote

OS: Fedora 10
Running
Apache/2.2.11 (Unix) DAV/2 PHP/5.2.9 mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.11 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0

When I try to access my Drupal 6 site I get
child pid xxxx exit signal Segmentation fault (11)
I have tried to catch a core file but my configuration httpd.conf
CoreDumpDirectory /tmp/apache2-gdb-dump
is not working

Can you give me some hints to debug this?

I tried enabling mod_status but I ran into some conflicts between httpd.conf and .htaccess, perhaps you could shed some light on that too?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 10 Sep '09 9:04    Post subject: Reply with quote

What is in the apache error log from that? Parallel maybe the access log. Does any specific file crash it? I guess you run apache in prefork mode? Did you enable the php error log in php.ini?
Back to top
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Thu 10 Sep '09 14:27    Post subject: child pid xxxx exit signal segmentatino fault Reply with quote

You are correct about the prefork mode...

That's all that appears in the apache error log some time several of the children die from segmentation faults. I have enabled core dumps, in an attempt to capture the offender, but nothing shows up in the specified directory.

Access log shows my attempts to access the drupal site portion, some google bots collecting information from the calendar portion of the web that some people have subscribed to, nothing unusual

I have set -
error_reporting = E_ALL
log_errors = On
error_log = php_error

at various places in php.ini

but I can't find it in /var/log or /etc or /
using find . -name "php_error" -print

have I mis-configured something? is there another pertinent setting?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 10 Sep '09 16:49    Post subject: Reply with quote

You have to define the path.

e.g.
error_log = /var/logs/php_errors.log

Ok. it is a bit tricky. You have to find out a in the apache error log at which date and time apache crashed. Than search for that date and time in the access log and php error log. Maybe you can use grep to find it faster.

If it is the PHP process which cashes apache you can separate it from apache using fcgid or fastcgi. But first you have to discover what crashes your server.
Back to top
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Thu 10 Sep '09 17:48    Post subject: child pid xxxx exit signal segmentatino fault Reply with quote

How do I suggest to the php folks a change to the default php.ini?
it said
; Log errors to specified file.
;error_log = filename

so I assumed that the path was /var/log already
better? --
; Log errors to the specified file.
;error_log = /path_to_logfiles/filename

***Back to our regular program***
It's even trickier if the log files never show up...

changed php.ini to
error_log = /var/log/php_error

and
find / -name "*php_error*" -print
yielded nothing
perhaps the drupal code is catching the error reports and re-directing them.

Here is my (slightly sanitized, and stripped of comments
grep -v ^\; /etc/php.ini |grep -v ^$) php.ini
Do you see anything unsual?

http://pastebin.com/f571a952c

Modnote: I sourced the php.ini out to pastebin
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 11 Sep '09 10:30    Post subject: Reply with quote

Unusual is only max_execution_time = 1000 and max_input_time = 1000 which is very high!

So now. What is in the /var/log/php_error

Did you compare apache access log and apache error log and php error log? So what happens in the log files when apache crashes?
Back to top
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Fri 11 Sep '09 19:04    Post subject: Reply with quote

This is not a big and fast machine... so I increased the times when WSOD visited in the past.

There is no /var/log/php_error
There is no php_error anywhere in the file system...
I find that confusing

access_log and error_log are typical (except for the death of the child processes)
nothing to help me track down the cause.

Bugzilla is working under the same httpd server and so is PHPiCalendar v2.24

so I'm starting to concentrate on Drupal6 code...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 11 Sep '09 21:55    Post subject: Reply with quote

Did you restart apache after you made the changes to php.ini? I hope you did.

Also I recommend you to use mod_fcgid to separate PHP from apache process so it won't crash apache than.

Is there a spicific page or call from Drupal that causes apache crashing? What is the last call when apache crashes?
Back to top
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Fri 11 Sep '09 22:51    Post subject: Reply with quote

fcgid is already loaded
is there a trick to turning it on?
all the drupal pages are WhiteScreenOfDeath and leaving exit signal Segmentation fault (11) messages in the httpd/error_log
no stack trace and
no /var/log/php_error file and
no /tmp/apache2-gdb-dump/xxx-core file

drupal code has a syslog module that describes it self as sending messages to syslog

aha... there are some drupal messages in the syslog...

there is a message that I use to see on the page (when I could see the page results about a parameter type mismatch), and an access denied message during a cron job that checks for module updates, and a page not found for a calendar import from civicrm that I was trying to set up near the time of the WSOD.

but they are not related to my attempts the timestamps are too old

still I'd like to know where the php_error file is...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sat 12 Sep '09 18:39    Post subject: Reply with quote

How to use PHP over fcgid on *nix system you can finde here. http://fastcgi.coremail.cn/configuration.htm#PHP

Hope that helps.
Back to top
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Thu 17 Sep '09 21:54    Post subject: child pid xxxx exit signal segmentatino fault Reply with quote

I haven't been able to properly configure PHP over fcgid...
It starts hiding my installation and showing me the apache "you don't have any content yet" screen...

meanwhile...
I lowered the resource limits to
max_execution_time = 600 ;
max_input_time = 90 ;
memory_limit = 64M ;

httpd/error_log :
...
PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 274420 bytes) in /var/www/html/includes/database.mysql-common.inc on line 34, referer: http://[mySite]/update.php?op=results
child pid xxxxx exit signal Segmentation fault (11)
...

raising it to 96M makes the PHP Fatal error go away
but the child still dies with SegFault

if I try to attach a gdb to the child procs they don't die but they don't do anything either... browser just hangs waiting for response.

I updated my installation to Drupal 6.14 incase the php error was fixed,
but no... still WSOD.... and no bread crumbs to follow (at least none that I recognize.
...
Back to top
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Thu 17 Sep '09 22:16    Post subject: child pid xxxx exit signal segmentation fault Reply with quote

I haven't been able to properly configure PHP over fcgid...
It starts hiding my installation and showing me the apache "you don't have any content yet" screen...

meanwhile...
I lowered the resource limits to
max_execution_time = 600 ;
max_input_time = 90 ;
memory_limit = 64M ;

httpd/error_log :
...
PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 274420 bytes) in /var/www/html/includes/database.mysql-common.inc on line 34, referer: http://[mySite]/update.php?op=results
child pid xxxxx exit signal Segmentation fault (11)
...

raising it to 96M makes the PHP Fatal error go away
but the child still dies with SegFault

if I try to attach a gdb to the child procs they don't die but they don't do anything either... browser just hangs waiting for response.

I updated my installation to Drupal 6.14 incase the php error was fixed,
but no... still WSOD.... and no bread crumbs to follow (at least none that I recognize.
...
Back to top
jslavranchuk



Joined: 09 Sep 2009
Posts: 8
Location: Hillsborough, NJ

PostPosted: Thu 17 Sep '09 22:56    Post subject: child pid xxxx exit signal segmentation fault Reply with quote

When I make the <Directory /var/www/html > I get a Fedora Test page
when I just provide <Directory /var/www/html/scripts> ...WSOD
if I put a <Directory block for each of scripts sites modules and themes
WSOD with chid exit SegFault message in httpd/error_log

I have an fcgid.conf in /etc/httpd/conf.d :
# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm

LoadModule fcgid_module modules/mod_fcgid.so

# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>

# Sane place to put sockets and shared memory file
SocketPath run/mod_fcgid
SharememPath run/mod_fcgid/fcgid_shm
#
# 20090917 jsl
#
<Directory /var/www/html/scripts>
SetHandler fcgid-script
FCGIWrapper /usr/bin/php .php

Options ExecCGI
allow from all
</Directory>
Back to top


Reply to topic   Topic: child pid xxxx exit signal segmentatino fault View previous topic :: View next topic
Post new topic   Forum Index -> Apache