ID:               17414
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Apache2 related
 Operating System: Linux
 PHP Version:      4.3.0
 Assigned To:      aaron
 New Comment:

FWIW, I can reproduce this every time on MPM-prefork Apache 2.0.43 and
PHP 4.3.0.  No threads involved.  This occurs after an 'apache2ctl
graceful' with gdb attached to the parent process (gdb stops on the
SIGUSR1, is continued, segv ensues).  The server was started with
StartServers=1 and MinSpareServers=1, then the restart immediately
attempted, though it happens regardless of these.

This is linux 2.4.19 (Debian Woody/Sid hybrid), glibc 2.3.

Program received signal SIGSEGV, Segmentation fault.
0x40585181 in sapi_initialize_empty_request (tsrm_ls=0x8108740)
    at /usr/src/apache/php/php-4.3.0/main/SAPI.c:399
399             SG(server_context) = NULL;
(gdb) bt
#0  0x40585181 in sapi_initialize_empty_request (tsrm_ls=0x8108740)
    at /usr/src/apache/php/php-4.3.0/main/SAPI.c:399
#1  0x4057f8ec in php_module_startup (sf=0x40605360, 
    additional_modules=0x40605540, num_additional_modules=1)
    at /usr/src/apache/php/php-4.3.0/main/main.c:1035
#2  0x405c820e in php_apache2_startup (sapi_module=0x40605360)
    at
/usr/src/apache/php/php-4.3.0/sapi/apache2filter/sapi_apache2.c:269
#3  0x405c89cd in php_apache_server_startup (pconf=0x80c3c30,
plog=0x80fbd10, 
    ptemp=0x8101d28, s=0x80c6298)
    at
/usr/src/apache/php/php-4.3.0/sapi/apache2filter/sapi_apache2.c:556
#4  0x0807fe59 in ap_run_post_config ()
#5  0x08085e11 in main ()
#6  0x402409f1 in __libc_start_main () from /lib/libc.so.6


Previous Comments:
------------------------------------------------------------------------

[2003-01-10 15:21:12] [EMAIL PROTECTED]

I am also experiencing this bug.  It is annoying because it causes
apache to silently die every night when the logrotate script runs
(installed from the "apache2-common 2.0.43-1" debian package)

install details:
Apache/2.0.43 (Debian GNU/Linux)
PHP/4.3.0RC4
php configure: ./configure  --with-mysql=/usr --with-imap
--with-imap-ssl --with-apxs2=/usr/bin/apxs2 --with-gettext --with-xml
running mpm-prefork

error log:

[Fri Jan 10 11:59:41 2003] [notice] seg fault or similar nasty error
detected in the parent proces

"apache2ctl restart" doesn't crash when php module isn't loaded

If I can help, let me know!

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

[2003-01-03 14:35:35] [EMAIL PROTECTED]

Still occurs in 4.3.0

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

[2002-12-10 16:00:46] [EMAIL PROTECTED]

4.3.0 RC2 configured with:
'./configure' '--enable-experimental-zts'
'--with-apxs2=/usr/local/apache2-php/bin/apxs' '--enable-debug'

the phpinfo() function generates the page that is dumped to:
http://samizdat.positive-internet.com/~thom/phpinfo.html

the sequence is:
in ServerRoot:
bin/apachectl start
make connection to verify the server is running, resulting in the above
page.
bin/apachectl restart
apache dies at this point.

this is the error log:
[Tue Dec 10 21:40:23 2002] [notice] Apache/2.0.44-dev (Unix)
PHP/4.3.0RC2 configured -- resuming normal operations
[Tue Dec 10 21:41:51 2002] [notice] SIGHUP received.  Attempting to
restart
[Tue Dec 10 21:41:54 2002] [notice] seg fault or similar nasty error
detected in the parent process

(gdb) where
#0  0x4031e2d9 in php_output_activate (tsrm_ls=0x813c0c0)
    at /home/thom/php-4.3.0RC2/main/output.c:85
#1  0x4030e86a in php_module_startup (sf=0x4039c460, 
    additional_modules=0x4039c640, num_additional_modules=1)
    at /home/thom/php-4.3.0RC2/main/main.c:1021
#2  0x4035d65e in php_apache2_startup (sapi_module=0x4039c460)
    at /home/thom/php-4.3.0RC2/sapi/apache2filter/sapi_apache2.c:269
#3  0x4035dded in php_apache_server_startup (pconf=0x80b60c8,
plog=0x80ee1a8, 
    ptemp=0x80b80d0, s=0x80f4a60)
    at /home/thom/php-4.3.0RC2/sapi/apache2filter/sapi_apache2.c:551
#4  0x0807c381 in ap_run_post_config (pconf=0x80b60c8, plog=0x80ee1a8,

    ptemp=0x80b80d0, s=0x80f4a60) at config.c:130
#5  0x08080bbc in main (argc=3, argv=0xbffffd54) at main.c:640

(gdb) frame 0
#0  0x4031e2d9 in php_output_activate (tsrm_ls=0x813c0c0)
    at /home/thom/php-4.3.0RC2/main/output.c:85
85              OG(php_body_write) = php_ub_body_write;
(gdb) frame 1
#1  0x4030e86a in php_module_startup (sf=0x4039c460, 
    additional_modules=0x4039c640, num_additional_modules=1)
    at /home/thom/php-4.3.0RC2/main/main.c:1021
1021            php_output_activate(TSRMLS_C);
(gdb) frame 2
#2  0x4035d65e in php_apache2_startup (sapi_module=0x4039c460)
    at /home/thom/php-4.3.0RC2/sapi/apache2filter/sapi_apache2.c:269
269             if (php_module_startup(sapi_module, &php_apache_module,
1)==FAILURE) {
(gdb) frame 3
#3  0x4035dded in php_apache_server_startup (pconf=0x80b60c8,
plog=0x80ee1a8, 
    ptemp=0x80b80d0, s=0x80f4a60)
    at /home/thom/php-4.3.0RC2/sapi/apache2filter/sapi_apache2.c:551
551             apache2_sapi_module.startup(&apache2_sapi_module);

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

[2002-12-08 17:55:57] [EMAIL PROTECTED]

Thatīs pure luck as GD is not threadsafe.

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

[2002-12-08 17:53:10] [EMAIL PROTECTED]

If you are compiling Apache 2.0 with worker model you should've used
the --enable-experimental-zts, which enables threading support in PHP,
you didn't do that.
Did you personally see it crash with prefork? I did not and I am
running Apache 2.0.43 (prefork) with PHP 4.3.0-dev and surprisingly it
served some 10,000 requests to PHP script doing GD image manipulations
without a single crash.

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

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/17414

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

Reply via email to