php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10379 ns-httpd crashes on php content.
Submitted: 2001-04-18 09:54 UTC Modified: 2002-08-13 22:46 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: ptierney at iss dot net Assigned:
Status: Not a bug Package: iPlanet related
PHP Version: 4.0.4pl1 OS: Solaris 7
Private report: No CVE-ID: None
 [2001-04-18 09:54 UTC] ptierney at iss dot net
The configure line:
./configure --with-nsapi=/opt/NetScape/server4 --with-oci8=/oracle/OraHome1 --prefix=/usr/local/php --mandir=/usr/man --srcdir=/usr/src/php-4.0.4pl1 --with-exec
-dir --enable-track-vars --enable-force-cgi-redirect --enable-discard-path --with-config-file-path=/opt/NetScape/server4

Using Iplanet 4.1sp6 on Sun 420R, single proc, 1GB ram

We were seeing large numbers of watchdog restarts, whenever php was enabled, as many as 100 in 5 minutes.  After much testing, we started to realize larger php files appeared to be causing the problem.  We have been able to create a php file that is 3812 lines long, that will crash the ns-httpd service _every_ time.  It is too long to attach here, but I can email it, once I have an address.  It simply consists of the following:
===========
<?php
        <HTML><HEAD><TITLE>bombs.php</TITLE></HEAD>";
        print "<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000FF\"";
        print "VLINK=\"#840084\" ALINK=\"#0000FF\">";
        print "There is a file in this directory called BigBigGame.php";
<*REPEAT ABOVE LINE 3805 TIMES*>
 print "</BODY></HTML>";
 ?>
============

I am unable to obtain a backtrace, as netscape won't start with debug version.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-19 11:33 UTC] ptierney at iss dot net
Was able to get some output from gdb.  This is not the debug build, but built with -g to gcc.

(gdb) cont
Continuing.
[New Thread 12 (LWP 4)]
[Switching to Thread 12 (LWP 4)]

Program received signal SIGSEGV, Segmentation fault.
0xfed34434 in thr_getspecific () from /usr/lib/libthread.so.1
(gdb) bt
#0  0xfed34434 in thr_getspecific () from /usr/lib/libthread.so.1
Cannot access memory at address 0xfde41f44
 [2001-04-19 13:58 UTC] ptierney at iss dot net
Was able to get some output from gdb.  This is not the debug build, but built with -g to gcc.

(gdb) cont
Continuing.
[New Thread 12 (LWP 4)]
[Switching to Thread 12 (LWP 4)]

Program received signal SIGSEGV, Segmentation fault.
0xfed34434 in thr_getspecific () from /usr/lib/libthread.so.1
(gdb) bt
#0  0xfed34434 in thr_getspecific () from /usr/lib/libthread.so.1
Cannot access memory at address 0xfde41f44
 [2001-04-19 17:49 UTC] andi@php.net
Can you please try the latest snapshot available at snaps.php.net or even better the latest CVS (make sure you grab the latest CVS of TSRM if you use CVS).

 [2001-04-20 10:28 UTC] ptierney at iss dot net
Compile failed using php4-200104200645:

Making all in oci8
/bin/sh /usr/share/src/php4-200104200645/libtool --silent --mode=compile gcc  -I. -I/usr/share/src/php4-200104200645/ext/oci8 -I/usr/share/src/php4-200104200645/main -I/usr/share/src/php4-200104200645 -I/opt/NetScape/server4/plugins/include -I/usr/share/src/php4-200104200645/Zend -I/usr/share/src/php4-200104200645/ext/mysql/libmysql -I/opt/Oracle/rdbms/demo -I/opt/Oracle/network/public -I/opt/Oracle/plsql/public -I/usr/share/src/php4-200104200645/ext/xml/expat/xmltok -I/usr/share/src/php4-200104200645/ext/xml/expat/xmlparse -I/usr/share/src/php4-200104200645/TSRM  -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -I../TSRM -DTHREAD=1 -g -O2 -pthreads  -c oci8.c
oci8.c: In function `php_if_ocicollappend':
oci8.c:4361: `oci_globals' undeclared (first use in this function)
oci8.c:4361: (Each undeclared identifier is reported only once
oci8.c:4361: for each function it appears in.)
oci8.c: In function `php_if_ocicolldategetelem':
oci8.c:4485: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicolldateassignelem':
oci8.c:4595: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicolldateappendelem':
oci8.c:4689: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicollgetelem':
oci8.c:4741: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicollassign':
oci8.c:4828: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicollassignelem':
oci8.c:4889: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicollsize':
oci8.c:4972: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicollmax':
oci8.c:4994: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocicolltrim':
oci8.c:5020: `oci_globals' undeclared (first use in this function)
oci8.c: In function `php_if_ocinewcollection':
oci8.c:5062: `oci_globals' undeclared (first use in this function)
*** Error code 1
make: Fatal error: Command failed for target `oci8.lo'
Current working directory /usr/share/src/php4-200104200645/ext/oci8
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/share/src/php4-200104200645/ext/oci8
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/share/src/php4-200104200645/ext
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
 [2001-05-07 11:15 UTC] ptierney at iss dot net
I've been able to DL and compile 4.0.5.  Now Iplanet will not start with PHP enabled.  Relevant obj.conf lines:

Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" shlib="/
opt/NetScape/server4/bin/libphp4.so"
Init fn="php4_init" errorString="Failed to Initialize PHP!"

Service method="(GET|HEAD|POST)" type="magnus-internal/x-httpd-php" fn="php4_execute"

<Object name="x-httpd-php">
ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
Service fn="php4_execute"
</Object>

Last few lines of truss of process:

23555:  door_info(7, 0xFFBEE7A8)                        = 0
23555:  getpid()                                        = 23555 [23554]
23555:  door_call(7, 0xFFBEE790)                        = 0
23555:  close(7)                                        = 0
23554:  signotifywait()                                 = 17
23554:      Received signal #17, SIGUSR2, in sigsuspend() [caught]
23554:        siginfo: SIGUSR2 pid=23555 uid=16
23554:  lwp_sigredirect(1, SIGUSR2)                     = 0
23554:  sigsuspend(0xFFBEF3F0)                          Err#4 EINTR
23554:  sysconfig(_CONFIG_SIGRT_MIN)                    = 38
23554:  sigprocmask(SIG_SETMASK, 0xFEFBDAE0, 0x00000000) = 0
23554:  sigprocmask(SIG_SETMASK, 0xFEFC9810, 0x00000000) = 0
23554:  sysconfig(_CONFIG_SIGRT_MIN)                    = 38
23554:  setcontext(0xFFBEECE0)
23554:  sigprocmask(SIG_SETMASK, 0xFFBEF380, 0x00000000) = 0
23554:  llseek(0, 0, SEEK_CUR)                          = 165404
23554:  _exit(1)
23557:          *** process killed ***
23555:  unlink("/opt/NetScape/server4/https-itjs44.iss.net/logs/pid") = 0
23555:  fstat(4, 0xFFBEF2C0)                            = 0
23555:  close(4)                                        = 0
23555:  llseek(0, 0, SEEK_CUR)                          = 165625
 [2002-08-13 22:46 UTC] kalowsky@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC