PHP 4.0 Bug #9658 Updated: saps Servlet reproducible crash.
| From: | alt at gimp dot org | Date: | Fri, 09 Mar 2001 22:01:28 +0000 |
| Subject: | PHP 4.0 Bug #9658 Updated: saps Servlet reproducible crash. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48453@lists.php.net to get a copy of this message | ||
ID: 9658
User Update by: alt@gimp.org
Status: Open
Bug Type: Unknown/Other Function
Description: saps Servlet reproducible crash.
Bugs 9658 and 9659 are different.
9658 refers to a crash in the JNI code. No java exceptions were thrown when this stack trace was
produced. A simple one line script was run. The script did access many java methods and data items
however.
9659 refers to problems explicitly todo with throwing exceptions in java code that has been called
from a php script (see the except.php script in the distribution).
I think these are two separate bugs (unless you class all crashes the same).
After I applies the code changes suggested in 9659 the exception problem went away, however bug 9658
remained. Simple scripts now work reasonably well (apart from the memory usage problems outlined in
9660).
Previous Comments:
---------------------------------------------------------------------------
[2001-03-09 13:33:57] sniper@php.net
./configure --with-java --with-servlet
Sun JVM (also happens with IBM JVM).
Java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
sapi_servlet_ub_write() and other native methods should
check for java exceptions when calling java methods.
The call to
(*jenv)->CallVoidMethod(jenv, servlet, write, arg);
should really be followed by :-
{
jthrowable exc;
exc = (*jenv)->ExceptionOccurred(jenv);
if (exc) {
(*jenv)->ExceptionClear(jenv);
}
}
or similar with reporting capabilities.
(When I applied this patch it seemed to fix the exception problem).
----------
Please update this report and not open any new ones
about same bug. Thank you.
--Jani
---------------------------------------------------------------------------
[2001-03-09 12:28:53] alt@gimp.org
Servlet sapi seems to be very unstable.
Running the jinfo.php script causes a segv after the third execution (appears at this time it is
reusing a previous thread, if it has a new thread it works OK).
Configuration:-
./configure --with-java --with-servlet
Sun JVM (also happens with IBM JVM).
Java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
Dump details:-
Program received signal SIGSEGV, Segmentation fault.
0x48875c5f in zend_hash_index_update_or_next_insert (ht=0x828b27c, h=0,
pData=0xbe5ff300, nDataSize=4, pDest=0x0, flag=1) at zend_hash.c:398
398 p = ht->arBuckets[nIndex];
print *ht
$1 = {nTableSize = 175514000, nHashSizeIndex = 9, nNumOfElements = 136884872,
nNextFreeElement = 135386148, pHashFunction = 0,
pInternalPointer = 0x826ff2c, pListHead = 0x0, pListTail = 0x0,
arBuckets = 0x70736572, pDestructor = 0x65736e6f, persistent = 0 '