Bug #17020 Updated: Servlet sapi native code problems

From: Date: Fri, 12 Jul 2002 21:17:09 +0000
Subject: Bug #17020 Updated: Servlet sapi native code problems
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14020@lists.php.net to get a copy of this message
 ID:               17020
 Updated by:       mark@tapinternet.com
 Reported By:      mark@tapinternet.com
 Status:           Open
 Bug Type:         Servlet related
 Operating System: Linux - 2.4.18
 PHP Version:      4.2.0
 New Comment:

Compiling with --enable-debug and the CFLAG -g3 seems to 
make the servlet SAPI a lot more stable.  add 
--enable-debug to your configure script.  And export an 
environment variable CFLAGS before you configure. 
 
export CFLAGS ="-O3 -mcpu=i686 -march=i686 
-malign-functions=4  -pthread -g3 -Wall -DZTS -prefer-pic" 
 
Make sure that INLINE_CFLAGS is set to this in the 
Zend/Makefile and the TSRM/Makefile.  If not, just change 
them and remake.  You might have to remove libphp4.so and 
sapi/servlet/phpsrvlt.jar to make sure the recompile works 
properly.  Copy the phpsrvlt.jar back to your tomcat 
shared/lib/ folder and re run tomcat.  Now, every php page 
you hit you should see this on the command line: 
 
fopen_wrappers.c(656) :  Freeing 0x084E2DE8 (41 bytes), 
script=- 
servlet.c(334) :  Freeing 0x0822EF30 (4 bytes), script=- 
 
If you see this, you know you're good to go.  Hopefully 
the servlet SAPI will improve stability with ZE2.  I just 
got this working for more than 10 requests, so email me if 
you need any help.  Seems rock solid so far.


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

[2002-07-12 13:48:23] mark@tapinternet.com

latest php-4.2.1 
latest tomcat-4.1.7 
sun jvm 1.4.0 
After running any php script about 10 times, the whole 
tomcat server dies with output like the following.  All 
signals originatre from zend_hash.c from various functions 
including zend_hash_rehash() and 
zend_hash_index_update_or_next_insert() 
 
 
An unexpected exception has been detected in native code 
outside the VM. 
Unexpected Signal : 11 occurred at PC=0x4CB77EEB 
Function=zend_hash_index_update_or_next_insert+0x2B 
Library=/usr/local/php-servlet/lib/php/libphp4.so 
 
Current Java thread: 
        at net.php.reflect.setResultFromObject(Native 
Method) 
        at net.php.reflect.setResult(reflect.java:105) 
        at net.php.servlet.readCookies(servlet.java:93) 
        at net.php.servlet.send(Native Method) 
        at net.php.servlet.service(servlet.java:188) 
        at net.php.servlet.service(servlet.java:212) 
        at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
...

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

[2002-07-11 00:29:20] zack@nostromocorp.com

I'm also having this problem, but I was only able to get to this point
by downloading the source and recompiling the phpsrvlt.jar myself
because the jar in the binary distribution did not contain any *.class
files!

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

[2002-05-05 15:32:58] mark@tapinternet.com

Native code problems with the current servlet sapi.
I've had this problem for over a year.  No one reports that they 
have been successfull getting the servlet sapit to work.
Please help me get PHP to be better.

php-4.2.0
tomcat 4.0.3
j2sdk-1.4.0

info.php
<? phpinfo(); ?>

javax.servlet.ServletException: bailout
	at net.php.servlet.send(Native Method)
	at net.php.servlet.service(servlet.java:188)
	at net.php.servlet.service(servlet.java:212)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
	at java.lang.Thread.run(Thread.java:536)



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


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



Thread (11 messages)

« previous php.bugs (#14020) next »