#27231 [Opn->Ver]: Large-size PHP script crashes SunONE webserver

From: Date: Sat, 14 Feb 2004 15:54:53 +0000
Subject: #27231 [Opn->Ver]: Large-size PHP script crashes SunONE webserver
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-54901@lists.php.net to get a copy of this message
 ID:               27231
 Updated by:       sniper@php.net
 Reported By:      herman at frontier dot nl
-Status:           Open
+Status:           Verified
 Bug Type:         iPlanet related
 Operating System: SunOS 5.8+
 PHP Version:      4CVS-2004-02-13


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

[2004-02-13 18:32:00] thetaphi@php.net

You do not need to test ist on your system. I can reproduce the crashs
here, even with the latest stable snapshot.
I think we should try to reproduce this with other multithreaded
servers to check if it is a ZTS bug (I think it is one).

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

[2004-02-13 09:00:58] thetaphi@php.net

Same on PHP 4.3.5 RC2 of SunOS 5.9. Tried to debug it but the crashing
process did not create a core dump.

If somebody of the others helps this:

# /opt/forte7/SUNWspro/bin/dbx 
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.0' in
your .dbxrc
(dbx) attach 9702
...
...
detected a multithreaded program
Attached to process 9702 with 90 LWPs
t@1 (l@1) stopped in __lwp_park at 0xfe3e5f88
0xfe3e5f88: __lwp_park+0x0010:  ta      %icc,%g0 + 8
(dbx) cont

-> here starting of crashing test2.php

t@85 (l@85) signal SEGV (no mapping at the fault address) in
zend_clean_garbage at line 25 in file "zend_execute_locks.h"
   25           while (EG(garbage_ptr)) {
dbx: read of 4 bytes at address ee2cf748 failed -- Error 0
(dbx) where
current thread: t@85
=>[1] zend_clean_garbage(tsrm_ls = <bad address 0xee2cf7dc>), line 25
in "zend_execute_locks.h"
dbx: read of 4 bytes at address ee2cf7b8 failed -- Error 0
dbx: attempt to read frame failed -- cannot derive frame pointer
(dbx) 

seems to be a TSRM problem because in CLI it does not appear. And crash
is not in NSAPI code.

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

[2004-02-13 03:42:22] herman at frontier dot nl

Sorry, forgot to mention: no, using the CLI (at least scripts #1 and
#2) they run OK.

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

[2004-02-12 20:52:26] iliaa@php.net

Does it crash with PHP-CLI? 

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

[2004-02-12 14:59:48] herman at frontier dot nl

Description:
------------
When trying an PHP application (which uses generated code, some rather
quite large files) on Sun server running Solaris 8, the SunONE
webserver 6.1 and PHP 4.3.4 using nsapi, one of the scripts crashed the
server.

After some experimenting, it seems the size of the script file
triggered the crash: a PHP script > 128KB will bring down the server, a
script < 128KB will not.

To complicate matters a bit, if a small script includes a large script,
the server will also crash, but if a small script will include two
"half size" scripts, it will not.

The server seems to run other PHP scripts well, and is also used to run
applets through its nsapi interface without problems.

PHP has been compiled as per instructions on the PHP website, with
mysql disabled, and ldap and oci8 enabled.



Reproduce code:
---------------
The test scripts consist of:

<?php
echo "hello";
exit;

$a = "123456789012345678901234567890123456789012345678901234567890";
// previous line copied till the script is large enough
?>

The scripts can be found at:

http://www.ozuzo.net/phpbug/test1.php.txt
=> WORKS
http://www.ozuzo.net/phpbug/test2.php.txt
=> CRASH

Include examples:

http://www.ozuzo.net/phpbug/test3.php.txt
=> WORKS
http://www.ozuzo.net/phpbug/test3a.php.txt
http://www.ozuzo.net/phpbug/test3b.php.txt

http://www.ozuzo.net/phpbug/test4.php.txt
=> CRASH
http://www.ozuzo.net/phpbug/test4a.php.txt

Expected result:
----------------
The word "hello".

Actual result:
--------------
The server crashes with the following message (no entry in the PHP
log):

failure (25268): CORE3107: Child process closed admin channel
fine (25268): CORE3061: signal_handler_thread: received signal 18
fine (25268): CORE3049: Primordial process detected child 25296 died:
status 11
fine (25268): CORE3050: Is our child, will spawn replacement
fine (25268): CORE3062: Unlinking of /tmp/<servername>/.cgistub_25296
returned -1
fine (25268): CORE3047: Server spawned worker process 25305





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


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


Thread (17 messages)

« previous php.bugs (#54901) next »