php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24567 Apache 2 Segfault when receiving a signal
Submitted: 2003-07-09 15:34 UTC Modified: 2003-07-11 03:11 UTC
From: php at grooky dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.3.3RC1 OS: RedHat 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at grooky dot com
New email:
PHP Version: OS:

 

 [2003-07-09 15:34 UTC] php at grooky dot com
Description:
------------
Apache 2 root process core when it received a signal (for example HUP or USR1 at logrotation) when php module loaded.

Bug is reproductible at least with Apache 2.0.44 .45 .46 or .47 and with php 4.3.1, 4.3.2, 4.3.3RC1, CVS-STABLE.

Bug is reproductible with linux 2.4.20 or 2.4.21 but NOT with the standard RedHat 9 kernel.

To reproduce the segfault :
kill -HUP "pid of apache root process"
apachectl graceful

Error log show : "[notice] seg fault or similar nasty error detected in the parent process"

Reproduce code:
---------------
php configure : ./configure --enable-debug --with-mysql --with-ldap --with-gettext --enable-force-cgi-redirect --with-apxs2=/tmp/apache2/bin/apxs --enable-track-vars --with-config-file-path=/etc

standard php.ini

As apache core only with any custom kernel I tried (but not with redHat one), here is my kernel configuration :
My kernel configuration :
http://www.grooky.com/linux.config

I found few people on newgroup's archive with exaclty the same segfault. None got solution.

Expected result:
----------------
Expected result : apache should reload it's configration

Actual result:
--------------
(gdb) bt
#0  0x26a5cc20 in sapi_initialize_empty_request (tsrm_ls=0x8b776452) at /usr/src/php-4.3.3RC1/main/SAPI.c:424
#1  0x26a57210 in php_module_startup (sf=0x26ad5e20, additional_modules=0x26ad6100, num_additional_modules=1)
    at /usr/src/php-4.3.3RC1/main/main.c:1094
#2  0x26a93fdb in php_apache2_startup (sapi_module=0x26ad5e20) at /usr/src/php-4.3.3RC1/sapi/apache2handler/sapi_apache2.c:297
#3  0x26a9410b in php_apache_server_startup (pconf=0x80da508, plog=0x81165f8, ptemp=0x811d810, s=0x26ad5e20)
    at /usr/src/php-4.3.3RC1/sapi/apache2handler/sapi_apache2.c:396
#4  0x08094240 in ap_run_post_config (pconf=0x80da508, plog=0x81165f8, ptemp=0x811d810, s=0x80de450) at config.c:131
#5  0x080986e2 in main (argc=3, argv=0x5db89cd4) at main.c:649
#6  0x267dba07 in __libc_start_main () from /lib/i686/libc.so.6

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-09 16:10 UTC] sniper@php.net
I can't reproduce this (I have kernel 2.4.19 SMP).
What is the version of the stock RH kernel this works with?

 [2003-07-09 16:30 UTC] php at grooky dot com
The segfault comes out with any kernel I build (whom by the way works fine with any other apps, including apache without PHP)

I wasn't able to reproduce it on my standard RH9 kernel (2.4.20-8)
 [2003-07-09 16:48 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


This doesn't sound like something we could really fix in PHP
but do try the latest CVS just in case. 

 [2003-07-09 16:50 UTC] sniper@php.net
And try it with this configure script:

./configure --with-apxs2=/tmp/apache2/bin/apxs --disable-all --disable-cli --without-pear

 [2003-07-10 03:44 UTC] php at grooky dot com
No differences with php4-STABLE-200307100730 and disable-all
--disable-cli

In fact, this bug migh be a dup of #17414. Similar backtrace and exactly same problem.

I have the bug on RedHat, but #17414 was found on debian also.

According to the bt, it really seems to be PHP's fault.
 [2003-07-11 00:05 UTC] sniper@php.net
What was the configure line used to configure Apache2?
(mainly I'm interested if you run it with "prefork" mpm or not)

 [2003-07-11 03:11 UTC] php at grooky dot com
with prefork, it doesn't do it since 4.3.2
with worker, it does it with the lastest CVS
 [2004-03-09 02:53 UTC] markus dot reinhardt at wsl dot ch
On worker mpm this bug still exists even with the newest CVS.
Someone know a bugfix?
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Dec 03 19:03:33 2021 UTC