|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-21 13:25 UTC] dwells at amgen dot com
I can reliably crash iPlanet by running "http_load
-parallel 5" by concurrently using both of the two scripts below. This is like 20613, but that was fixed in Nov and I have this problem now with a current version of php. I have found no resolution except to run php single-threaded - stable, but hardly an option for a 100-user app that makes Oracle queries...
I have reproduced this with iPlanet 6.0sp2 and 6.0sp5, php4.2.3, php 4.3.0, and php4-STABLE-200301140030, running on a 280R and an Ultra 2. I built php using gcc 2.95.3 with these options:
--prefix=/shared/gnu \
--with-config-file-path=$prefix/../lib \
--enable-discard-path --enable-tracking \
--enable-libgcc --with-ndbm \
--with-ldap=<openldap 2.0.27 path> \
--with-oracle=<oracle 8.1.7.2 path> \
--without-mysql --with-nsapi=<iplanet path>
The error I see is:
catastrophe (1625): Server crash detected (signal SIGSEGV)
info (1625): Crash occurred in NSAPI SAF php4_execute
info (1625): Crash occurred in function strlen from module /usr/lib/libc.so.1
Here is the back trace:
(gdb) bt
#0 0xfea33344 in strlen () from /usr/lib/libc.so.1
#1 0xfd6b3e90 in _estrdup (s=0xb8 <Address 0xb8 out of bounds>)
at /shared/gnu/src/php-4.2.3/Zend/zend_alloc.c:322
#2 0xfd738948 in php_print_info (flag=32, tsrm_ls=0x8600e8)
at /shared/gnu/src/php-4.2.3/ext/standard/info.c:273
#3 0xfd73935c in zif_phpinfo (ht=0, return_value=0x8d6c18, this_ptr=0x0,
return_value_used=0, tsrm_ls=0x8600e8)
at /shared/gnu/src/php-4.2.3/ext/standard/info.c:471
#4 0xfd6c2740 in execute () from /opt/local/php/lib/nsapi/libphp4.so
#5 0xfd6d50d0 in zend_execute_scripts (type=8, tsrm_ls=0x8600e8, retval=0x0,
file_count=3) at /shared/gnu/src/php-4.2.3/Zend/zend.c:812
#6 0xfd6e4368 in php_execute_script (primary_file=0xfaef1b48,
tsrm_ls=0x8600e8) at /shared/gnu/src/php-4.2.3/main/main.c:1383
#7 0xfd6e0b90 in nsapi_module_main (request_context=0x0, tsrm_ls=0x8600e8)
at /shared/gnu/src/php-4.2.3/sapi/nsapi/nsapi.c:462
#8 0xfd6e0d1c in php4_execute (pb=0x3d47f8, sn=0x6e3a90, rq=0x6e3ad8)
at /shared/gnu/src/php-4.2.3/sapi/nsapi/nsapi.c:513
#9 0xff239b14 in __0Fcfunc_native_pool_thread_mainP6NNSTPWorkArg_s ()
from /opt/local/netscape/dev/iws60sp5/bin/https/lib/libns-httpd40.so
#10 0xfe8e16cc in NSTP_ThreadMain ()
from /opt/local/netscape/dev/iws60sp5/bin/https/lib/libnstp.so
#11 0xfed676a0 in _pt_root ()
from /opt/local/netscape/dev/iws60sp5/bin/https/lib/libnspr4.so
(gdb)
Finally, here are the two scripts:
-----------------------
<html>
<body>
<h2>PHP Operational Qualification Test</h2>
<p>
This test displays a "Hello, world." announcment, then a series
of tables describing the PHP environment.
</p>
<p>
The classic announcement: <?php echo("Hello, world."); ?>
</p>
<p>
PHP Info for this installation:
</p>
<?php phpinfo(); ?>
</body>
</html>
----------------------------
<html>
<body>
<h2>PHP Operational Qualification Test: Oracle Connectivity</h2>
<p>
This test connects to an Oracle database and displays some stuff.
</p>
<p>
<?php
$userid = "dwells";
putenv("ORACLE_SID=clindev");
putenv("ORACLE_HOME=/opt/local/newshare/oracle/product/7.3.3.6");
putenv("TNS_ADMIN=/opt/local/newshare/oracle/product/7.3.3.6/network/admin");
$query = sprintf("select * from Employee");
$ncols = $nrows = 7;
printf("<p>Result size is ".$ncols." cols by ".$nrows." rows.</p>\n");
print "<table border=1>\n<tr valign=top align=center>\n";
for ($i=0; $i<$ncols; $i++) {
printf("<th>col[%s] = %s<br>type[%d] = %s</th>\n",
$i, "cursor", $i, "hisur");
}
print "</tr><tr valign=top align=left>\n";
for ($j=0; $j<$nrows; $j++) {
for ($i=0; $i<$ncols; $i++) {
printf("<td>val[%d, %d] =<br>'%s'</td>", $j, $i, 'howdy');
}
printf("\n");
}
print "</tr></table>\n";
?>
<p> </p>
</body>
</html>
----------------------------
Thanks,
David
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 15 09:00:01 2025 UTC |
I've had more time to look into this, and found that the script below will recreate the crash. Still using http_load -parallel 5, of course. Oh, and I noticed that I accidentally posted the 4.2.3 bt here. I'll post the 4.3.1-dev bt tomorrow. Thanks <?php putenv("SOME_VAR=/this/is/some/value/here/dont/you/think"); ?>