#27810 [Com]: Apache-2.0.49 crashes on graceful/restart

2004-04-22 Thread php dot 5 dot bluemonster at xoxy dot net
 ID:   27810
 Comment by:   php dot 5 dot bluemonster at xoxy dot net
 Reported By:  renato at galle dot com dot br
 Status:   Open
 Bug Type: Apache2 related
 Operating System: FreeBSD-5.2.1-RELEASE-p4
 PHP Version:  4.3.5
 New Comment:

I continue to have a problem on graceful restart when 
using the alternative patch. No error is logged but 
Apache stops responding after `apachectl graceful' or 
sending HUP. It does seem to work with a normal stop/
startssl. I'm on FreeBSD 5.2.1, whereas the others, 
for whom it's working, are on Linux.

I've reverted to a backup of 4.3.4 and am looking into 
FastCGI as an alternative.


Previous Comments:


[2004-04-22 16:33:37] sugihara at gix dot or dot jp

OS: VineLinux2.6r4(kernel2.4.22)
Apache: 2.0.49
PHP   : 4.3.6

I tried jorton's "alternative patch" too.
With or without SSL Apache behave properly when it catch 'HUP' or
'USR1' signal.



[2004-04-22 01:22:24] danu at drydog dot com

I tried jorton's "alternative patch" with PHP 4.3.6 and Apache 2.0.49
(with SSL) on an otherwise standard RedHat 9 on Intel. I can confirm it
works (that is, I can restart Apache) on 2 different systems.
YEAH!!

Previous to patching, it did not work (that is, Apache errored out with
these messages in the Apache error log:

[Wed Mar 31 17:14:43 2004] [notice] SIGHUP received.  Attempting to
restart
[Wed Mar 31 17:14:43 2004] [notice] seg fault or similar nasty error
detected in the parent process
[Wed Mar 31 17:14:48 2004] [warn] pid file /var/run/httpd.pid
overwritten -- Unclean shutdown of previous Apache run?



[2004-04-22 00:26:07] jorton at redhat dot com

Can you try this alternative patch:

http://www.apache.org/~jorton/php-4.3.6-pcrealloc.patch

--------------------------------

[2004-04-21 15:58:16] php dot 5 dot bluemonster at xoxy dot net

I continue to have problems with this, on FreeBSD 5.2.1 
using ale's patched port for 4.3.6 and apache 2.0.49.

apache seems to survive a graceful restart when I start 
it without SSL, but if I stop apache it leaves behind a 
bunch of httpd processes that I have to kill.

If I start apache with SSL then it does not survive the 
graceful restart.



[2004-04-21 07:46:57] sugihara at gix dot or dot jp

OS: VineLinux2.6r4(kernel2.4.22)
Apache: 2.0.49
PHP   : 4.3.6

FreeBSD port works fine on Linux too.
Without patch, 4.3.6 also caused Apache's segfault error. So Apache
crashed everytime log files were rotated by cron.
Thank you so much.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27810

-- 
Edit this bug report at http://bugs.php.net/?id=27810&edit=1


#27810 [Com]: Apache-2.0.49 crashes on graceful/restart

2004-04-21 Thread php dot 5 dot bluemonster at xoxy dot net
 ID:   27810
 Comment by:   php dot 5 dot bluemonster at xoxy dot net
 Reported By:  renato at galle dot com dot br
 Status:   Open
 Bug Type: Apache2 related
 Operating System: FreeBSD-5.2.1-RELEASE-p4
 PHP Version:  4.3.5
 New Comment:

I continue to have problems with this, on FreeBSD 5.2.1 
using ale's patched port for 4.3.6 and apache 2.0.49.

apache seems to survive a graceful restart when I start 
it without SSL, but if I stop apache it leaves behind a 
bunch of httpd processes that I have to kill.

If I start apache with SSL then it does not survive the 
graceful restart.


Previous Comments:


[2004-04-21 07:46:57] sugihara at gix dot or dot jp

OS: VineLinux2.6r4(kernel2.4.22)
Apache: 2.0.49
PHP   : 4.3.6

FreeBSD port works fine on Linux too.
Without patch, 4.3.6 also caused Apache's segfault error. So Apache
crashed everytime log files were rotated by cron.
Thank you so much.



[2004-04-20 16:49:04] paul at vanbrouwershaven dot com

Same problem here with the lasted stable release PHP 4.3.6



[2004-04-19 19:09:19] renato at galle dot com dot br

Here is the patch to fix it on php-4.3.6:

--- ext/pcre/php_pcre.c.origFri Apr 16 09:21:14 2004
+++ ext/pcre/php_pcre.c Fri Apr 16 09:23:36 2004
@@ -106,15 +106,6 @@
REGISTER_LONG_CONSTANT("PREG_SPLIT_DELIM_CAPTURE",
PREG_SPLIT_DELIM_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE",
PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS
| CONST_PERSISTENT);
-
-   pcre_malloc = php_pcre_malloc;
-   pcre_free = php_pcre_free;
-
-#ifdef NO_RECURSE
-   pcre_stack_malloc = php_pcre_malloc;
-   pcre_stack_free = php_pcre_free;
-#endif
-   
return SUCCESS;
 }
 /* }}} */
@@ -130,6 +121,16 @@
 }
 /* }}} */
 
+/* {{{ PHP_RINIT_FUNCTION(pcre) */
+static PHP_RINIT_FUNCTION(pcre)
+{
+   pcre_malloc = php_pcre_malloc;
+   pcre_free = php_pcre_free;
+
+   return SUCCESS;
+}
+/* }}} */
+
 /* {{{ pcre_get_compiled_regex
  */
 PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra,
int *preg_options) {
@@ -1527,7 +1528,7 @@
pcre_functions,
PHP_MINIT(pcre),
PHP_MSHUTDOWN(pcre),
-   NULL,
+   PHP_RINIT(pcre),
NULL,
PHP_MINFO(pcre),
NO_VERSION_YET,



[2004-04-19 19:09:19] renato at galle dot com dot br

Here is the patch to fix it on php-4.3.6:

--- ext/pcre/php_pcre.c.origFri Apr 16 09:21:14 2004
+++ ext/pcre/php_pcre.c Fri Apr 16 09:23:36 2004
@@ -106,15 +106,6 @@
REGISTER_LONG_CONSTANT("PREG_SPLIT_DELIM_CAPTURE",
PREG_SPLIT_DELIM_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE",
PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS
| CONST_PERSISTENT);
-
-   pcre_malloc = php_pcre_malloc;
-   pcre_free = php_pcre_free;
-
-#ifdef NO_RECURSE
-   pcre_stack_malloc = php_pcre_malloc;
-   pcre_stack_free = php_pcre_free;
-#endif
-   
return SUCCESS;
 }
 /* }}} */
@@ -130,6 +121,16 @@
 }
 /* }}} */
 
+/* {{{ PHP_RINIT_FUNCTION(pcre) */
+static PHP_RINIT_FUNCTION(pcre)
+{
+   pcre_malloc = php_pcre_malloc;
+   pcre_free = php_pcre_free;
+
+   return SUCCESS;
+}
+/* }}} */
+
 /* {{{ pcre_get_compiled_regex
  */
 PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra,
int *preg_options) {
@@ -1527,7 +1528,7 @@
pcre_functions,
PHP_MINIT(pcre),
PHP_MSHUTDOWN(pcre),
-   NULL,
+   PHP_RINIT(pcre),
NULL,
PHP_MINFO(pcre),
NO_VERSION_YET,



[2004-04-19 18:40:56] 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.



The remainder of the comments for this report are too long. To view
the rest of the comments, pleas