php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27899 Apache got segfault after received SIGHUP
Submitted: 2004-04-07 04:46 UTC Modified: 2004-04-13 12:44 UTC
Votes:16
Avg. Score:4.8 ± 0.6
Reproduced:15 of 15 (100.0%)
Same Version:9 (60.0%)
Same OS:10 (66.7%)
From: charvel at bluemission dot com Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 4.3.6RC2 OS: Linux 2.4.25
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-04-07 04:46 UTC] charvel at bluemission dot com
Description:
------------
Apache 2.0.49, mpm=worker - After killall -HUP httpd.worker
apache got:
[Wed Apr 07 10:19:58 2004] [notice] SIGHUP received.  Attempting to restart
[Wed Apr 07 10:19:58 2004] [notice] seg fault or similar nasty error detected in the parent process

I try with 4.3.6RC2 - bug still exist.

Command line use to build my php binaries:

Configure Command  './configure' '--prefix=/usr' '--with-apxs2' '--with-config-file-path=/etc/httpd' '--enable-safe-mode' '--with-exec-dir=/usr/bin' '--enable-pic' '--enable-inline-optimization' '--with-regex=system' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db' '--with-gdbm' '--with-curl' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--with-mysql' '--with-openssl' '--with-xml'  





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-07 04:57 UTC] sniper@php.net
Does Apache crash without PHP loaded in httpd.conf ?

And please don't use configure options you don't need to use, such as --with-regex=system (VERY BAD IDEA!), --enable-pic, --enable-inline-optimization..and --enable-debugger / --enable-track-vars don't even exist anymore (for a long time..)

 [2004-04-07 07:06 UTC] charvel at bluemission dot com
No, when I turn off loading php4 modules all work fine.
Thx for comments.
 [2004-04-07 08:37 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And configure PHP like this:

# ./configure --disable-all --with-apxs2

 [2004-04-07 13:29 UTC] charvel at bluemission dot com
Work fine :]
But when I complied with my settings bug still occure. I try to find which one options cause that.
 [2004-04-07 18:55 UTC] iliaa@php.net
1st of all try 4.3.5RC2, then if you still experience 
crashes check your php.ini to see if you are loading any 
PHP or Zend extensions. 
 [2004-04-08 05:58 UTC] charvel at bluemission dot com
4.3.5RC2 crash too. No, I have no extension of php or Zend loading in my php.ini
My full php.ini file http://link.pl/charvel/php.ini
 [2004-04-08 06:35 UTC] derick@php.net
I think he meant 4.3.6RC2 (not 4.3.5RC2), from: http://qa.php.net
 [2004-04-08 12:21 UTC] charvel at bluemission dot com
Well, I get a 4.3.6RC2, configure by:

./configure --with-apxs2

when I send to the master httpd process USR1 signal I got:

[Thu Apr 08 18:13:19 2004] [notice] SIGUSR1 received.  Doing graceful restart
[Thu Apr 08 18:13:19 2004] [notice] seg fault or similar nasty error detected in the parent process
[Thu Apr 08 18:13:19 2004] [emerg] (22)Invalid argument: apr_proc_mutex_unlock failed. Attempting to shutdown process gracefully.
 [2004-04-08 19:01 UTC] sniper@php.net
1. What MPM is Apache2 using?
2. Get fresh sources, and use this configure line:
# ./configure --disable-all --with-apxs2

 [2004-04-09 05:24 UTC] charvel at bluemission dot com
1. worker
2. In this case work fine.
 [2004-04-09 11:13 UTC] sniper@php.net
1. As you're using a threaded webserver and asking for trouble this bug is pretty much bogus. (the crash happens elsewhere than in PHP itself..where is the GDB backtrace?)

2. Try adding your original configure options (those ones excluded which I told you NOT to use) one by one and see which one causes the crash, like this:

# rm -f config.cache
# ./configure --disable-all --with-apxs2 --with-zlib
# make clean && make

(try them all _separately_ first!)

 [2004-04-13 12:44 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-04-16 08:49 UTC] afraser at w3internet dot com
Thought I would check the previous version of Apache, since I only got this problem after upgrading Apache (2.0.48 to 2.0.49) and PHP (4.3.3 to 4.3.5)

[root@fresca home] www/bin/httpd -v
Server version: Apache/2.0.48
Server built:   Dec 14 2003 15:23:08
[root@fresca home]# www/bin/apachectl configtest
[Fri Apr 16 09:46:54 2004] [crit] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
Pre-configuration failed

Probably this is not a bug... but if this makes sense to one of you gurus could you explain to us what we did wrong?
 [2004-04-19 18:38 UTC] remco at linux-adept dot nl
Using PHP 4.3.5 or 4.3.6 crashes my Apache 2.0.49 doing a 'apachectl graceful'. Which is a kill for logrotation! Everything was fine untill 4.3.5 came along. Changing back to 4.3.4 solves the problem.
I have tried recompiling apache etc. Nothing helps.
Gracefully restarting apache gives the following in the error-logs:
[Mon Apr 19 18:28:10 2004] [notice] Graceful restart requested, doing restart
[Mon Apr 19 18:28:10 2004] [notice] seg fault or similar nasty error detected in the parent process

And apache has to be restarted once more to get it running.
 [2004-04-20 13:40 UTC] karpet at comatosed dot co dot uk
Having broken my configure options down and started readding them.. it seems like it's pcre that's causing the problem. Both of the following work without "--with-pcre-regex", but not with.

feature packed configure line:
./configure --disable-all --enable-posix --enable-session --enable-overload --with-pcre-regex --with-config-file-path=/usr/local/apache-2.0.49/conf --with-apxs2=/usr/local/apache-2.0.49/bin/apxs --with-mysql=/usr/local/mysql --with-openssl=/usr --with-zlib --with-jpeg-dir --with-png-dir --with-freetype-dir --with-gd --with-gd-native-ttf

reduced configure line:
./configure --disable-all --with-pcre-regex --with-config-file-path=/usr/local/apache-2.0.49/conf --with-apxs2=/usr/local/apache-2.0.49/bin/apxs
 [2004-04-25 12:32 UTC] bars at neman dot by
I have the same problem every night when started log rotate.
RH 90 2.4.24
apache 2.0.49
php 4.3.5

php configure options:
export EXTRA_INCLUDES=-I/usr/kerberos/include
export EXTRA_LIBS=-L/usr/kerberos/lib
./configure \
--prefix=/usr \
--with-apxs2=/usr/sbin/apxs \
--with-config-file-path=/etc \
--enable-memory-limit \
--with-gd=/usr \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--with-zlib \
--with-jpeg \
--with-jpeg-dir=/usr/lib \
--with-png \
--with-png-dir=/usr/lib \
--with-mysql=/usr \
--with-xml \
--with-iconv \
--enable-sysvsem \
--enable-sysvshm \
--enable-trans-sid \
--enable-sockets \
--enable-ftp \
--enable-exif \
--with-pear=/usr/share/php \
--with-openssl \
--with-gdbm \
--enable-dbase

apache configure options:
export INCLUDES=-I/usr/kerberos/include
export LIBS=-L/usr/kerberos/lib

./configure \
--enable-layout=RedHat \
--enable-deflate \
--enable-ssl \
--enable-mods-shared=all \
--with-perl \
--enable-so

:(
 [2004-04-27 12:57 UTC] abc at anonymous dot com
I fixed it using the solution in Bug # 27810.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC