php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14441 php/sapi crashes under linux
Submitted: 2001-12-11 19:24 UTC Modified: 2002-03-25 00:00 UTC
Votes:8
Avg. Score:5.0 ± 0.0
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:2 (28.6%)
From: doc at punkass dot com Assigned:
Status: No Feedback Package: Java related
PHP Version: 4.1.0 OS: Linux Redhat 7.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: doc at punkass dot com
New email:
PHP Version: OS:

 

 [2001-12-11 19:24 UTC] doc at punkass dot com
Hi,

Im pretty sure this is a bug. I've been trying to install php into tomcat
for a while now; starting with 4.01 through 4.06 and today with 4.1.0.
Platform:
Linux Redhat 7.2
Tomcat 3.3/ 4.01 (tried both)
JDK 1.2.2 / 1.3.1 (tried both)
Sun servlet API / jakarta servlet api (tried both)

Environment: 
CLASSPATH=/usr/java/jdk/lib/tools.jar:/opt/appserver/jakarta-servletapi-4/lib/servlet.jar:/nightcare/Java/mm.mysql-2.0.4-bin.jar:/nightcare/Java:/usr/local/lib/php/phpsrvlt.jar
CVSROOT=:pserver:root@bsd2:/cvsroot
HOSTNAME=rh7
HOSTTYPE=i386
JAVA_HOME=/usr/java/jdk
LANG=en_US
LD_LIBRARY_PATH=/usr/local/lib/php
MACHTYPE=i386-redhat-linux-gnu
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin:/usr/java/jdk/bin:/home/toor/bin
TOMCAT_HOME=/opt/appserver/jakarta-tomcat-3.3

I got it running with the combination tomcat
3.3/jdk1.3.1/jakarta-servlet-api,  but it keeps stacking JVMs.
Then i request a page containing only "<?phpinfo() ?>"

which gives

System Linux rh7 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown 
Build Date Dec 11 2001 
Configure Command  './configure' '--with-apxs' '--with-servlet' '--with-java' '--without-mysql' 
Server API Java Servlet 
Virtual Directory Support enabled 
Configuration File (php.ini) Path /usr/local/lib/php.ini 
ZEND_DEBUG disabled 
Thread Safety enabled 

Then after about 30 requests for the same page (or any php page) the java environment crashes with the following message:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 8 occurred at PC=0x4c903e96
Function name=zend_hash_index_update_or_next_insert
Library=/usr/java/jdk1.3.1_01/jre/lib/i386/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:79)
 at net.php.servlet.send(Native Method)
 at net.php.servlet.service(servlet.java:162)
 at net.php.servlet.service(servlet.java:180)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java)
 at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
 at org.apache.tomcat.core.Handler.invoke(Unknown Source)
 at org.apache.tomcat.core.Handler.service(Unknown Source)
 at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
 at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
 at org.apache.tomcat.core.ContextManager.service(Unknown Source)
 at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
 at java.lang.Thread.run(Thread.java:484)

Dynamic libraries:
08048000-0804c000 r-xp 00000000 03:03 3598
/usr/java/jdk1.3.1_01/bin/i386/native_threads/java
0804c000-0804d000 rw-p 00003000 03:03 3598
/usr/java/jdk1.3.1_01/bin/i386/native_threads/java
40000000-40016000 r-xp 00000000 03:03 238299     /lib/ld-2.2.4.so
40016000-40017000 rw-p 00015000 03:03 238299     /lib/ld-2.2.4.so
40017000-40018000 r--p 00000000 03:03 127010
/usr/lib/locale/en_US/LC_IDENTIFICATION
40018000-40019000 r--p 00000000 03:03 222431
/usr/lib/locale/en_US/LC_MEASUREMENT
40019000-4001a000 r--p 00000000 03:03 254219
/usr/lib/locale/en_US/LC_TELEPHONE
4001a000-4001b000 r--p 00000000 03:03 254221
/usr/lib/locale/en_US/LC_ADDRESS
4001b000-4001c000 r--p 00000000 03:03 254220
/usr/lib/locale/en_US/LC_NAME
4001c000-4001d000 r--p 00000000 03:03 269875
/usr/lib/locale/en_US/LC_PAPER
4001d000-4001e000 r--p 00000000 03:03 16073
/usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
4001e000-4001f000 r--p 00000000 03:03 222430
/usr/lib/locale/en_US/LC_MONETARY
4001f000-40020000 r--p 00000000 03:03 127011
/usr/lib/locale/en_US/LC_TIME
40020000-40021000 r--p 00000000 03:03 95439
/usr/lib/locale/en_US/LC_NUMERIC
40023000-40030000 r-xp 00000000 03:03 47839      /lib/i686/libpthread-0.9.so
40030000-40038000 rw-p 0000c000 03:03 47839      /lib/i686/libpthread-0.9.so
40038000-40041000 r-xp 00000000 03:03 114860
/usr/java/jdk1.3.1_01/jre/lib/i386/native_threads/libhpi.so
40041000-40042000 rw-p 00008000 03:03 114860
/usr/java/jdk1.3.1_01/jre/lib/i386/native_threads/libhpi.so
40042000-4022f000 r-xp 00000000 03:03 83179
/usr/java/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
4022f000-40325000 rw-p 001ec000 03:03 83179
/usr/java/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
4033c000-4033f000 r-xp 00000000 03:03 238312     /lib/libdl-2.2.4.so
4033f000-40340000 rw-p 00002000 03:03 238312     /lib/libdl-2.2.4.so
40340000-40472000 r-xp 00000000 03:03 47835      /lib/i686/libc-2.2.4.so
40472000-40477000 rw-p 00131000 03:03 47835      /lib/i686/libc-2.2.4.so
4047b000-4048e000 r-xp 00000000 03:03 238317     /lib/libnsl-2.2.4.so
4048e000-4048f000 rw-p 00012000 03:03 238317     /lib/libnsl-2.2.4.so
40492000-404b4000 r-xp 00000000 03:03 47837      /lib/i686/libm-2.2.4.so
404b4000-404b5000 rw-p 00021000 03:03 47837      /lib/i686/libm-2.2.4.so
404b5000-404e9000 r-xp 00000000 03:03 98037
/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
404e9000-404f5000 rw-p 00033000 03:03 98037
/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
404f7000-40508000 r-xp 00000000 03:03 257788
/usr/java/jdk1.3.1_01/jre/lib/i386/libverify.so
40508000-4050a000 rw-p 00010000 03:03 257788
/usr/java/jdk1.3.1_01/jre/lib/i386/libverify.so
4050a000-4052b000 r-xp 00000000 03:03 257779
/usr/java/jdk1.3.1_01/jre/lib/i386/libjava.so
4052b000-4052d000 rw-p 00020000 03:03 257779
/usr/java/jdk1.3.1_01/jre/lib/i386/libjava.so
4052e000-40542000 r-xp 00000000 03:03 257789
/usr/java/jdk1.3.1_01/jre/lib/i386/libzip.so
40542000-40545000 rw-p 00013000 03:03 257789
/usr/java/jdk1.3.1_01/jre/lib/i386/libzip.so
40545000-41273000 r--s 00000000 03:03 130804
/usr/java/jdk1.3.1_01/jre/lib/rt.jar
412a0000-41545000 r--s 00000000 03:03 130797
/usr/java/jdk1.3.1_01/jre/lib/i18n.jar
41545000-4155b000 r--s 00000000 03:03 130805
/usr/java/jdk1.3.1_01/jre/lib/sunrsasign.jar
43603000-43609000 r--p 00000000 03:03 79565
/usr/lib/locale/en_US/LC_COLLATE
43609000-4360f000 r--s 00000000 03:03 195291
/opt/appserver/jakarta-tomcat-3.3/lib/common/etomcat.jar
49c6f000-49c9a000 r--p 00000000 03:03 95449
/usr/lib/locale/en_US/LC_CTYPE
49c9a000-49ca2000 r--s 00000000 03:03 147704
/opt/appserver/jakarta-tomcat-3.3/lib/tomcat.jar
49ca2000-49ca4000 r--s 00000000 03:03 195296
/opt/appserver/jakarta-tomcat-3.3/lib/common/core_util.jar
49ca5000-49caf000 r-xp 00000000 03:03 238333     /lib/libnss_files-2.2.4.so
49caf000-49cb0000 rw-p 00009000 03:03 238333     /lib/libnss_files-2.2.4.so
4a51c000-4a52b000 r--s 00000000 03:03 195290
/opt/appserver/jakarta-tomcat-3.3/lib/common/jasper-runtime.jar
4a52b000-4a536000 r--s 00000000 03:03 195295
/opt/appserver/jakarta-tomcat-3.3/lib/common/tomcat_core.jar
4a536000-4a540000 r--s 00000000 03:03 195293
/opt/appserver/jakarta-tomcat-3.3/lib/common/servlet.jar
4a540000-4a54f000 r--s 00000000 03:03 195294
/opt/appserver/jakarta-tomcat-3.3/lib/common/connector_util.jar
4a54f000-4a552000 r--s 00000000 03:03 147850
/opt/appserver/jakarta-tomcat-3.3/lib/common/phpsrvlt.jar
4a552000-4a56d000 r--s 00000000 03:03 195376
/opt/appserver/jakarta-tomcat-3.3/lib/common/mm.mysql-2.0.4-bin.jar
4a56d000-4a57c000 r--s 00000000 03:03 195406
/opt/appserver/jakarta-tomcat-3.3/lib/common/uzorg.jar
4a57c000-4a589000 r--s 00000000 03:03 147625
/opt/appserver/jakarta-tomcat-3.3/lib/container/facade22.jar
4a589000-4a63c000 r--s 00000000 03:03 147626
/opt/appserver/jakarta-tomcat-3.3/lib/container/xalan.jar
4a63c000-4a66f000 r--s 00000000 03:03 147630
/opt/appserver/jakarta-tomcat-3.3/lib/container/crimson.jar
4a66f000-4a691000 r--s 00000000 03:03 147627
/opt/appserver/jakarta-tomcat-3.3/lib/container/tomcat_util.jar
4a691000-4a6b8000 r--s 00000000 03:03 147629
/opt/appserver/jakarta-tomcat-3.3/lib/container/tomcat_modules.jar
4aab8000-4aac1000 r-xp 00000000 03:03 257786
/usr/java/jdk1.3.1_01/jre/lib/i386/libnet.so
4aac1000-4aac2000 rw-p 00008000 03:03 257786
/usr/java/jdk1.3.1_01/jre/lib/i386/libnet.so
4c8c2000-4c9be000 r-xp 00000000 03:03 258829
/usr/java/jdk1.3.1_01/jre/lib/i386/libphp4.so
4c9be000-4c9cc000 rw-p 000fb000 03:03 258829
/usr/java/jdk1.3.1_01/jre/lib/i386/libphp4.so
4c9d7000-4c9de000 r-xp 00000000 03:03 238506     /lib/libpam.so.0.75
4c9de000-4c9df000 rw-p 00006000 03:03 238506     /lib/libpam.so.0.75
4c9df000-4ca18000 r-xp 00000000 03:03 95611
/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
4ca18000-4ca1f000 rw-p 00038000 03:03 95611
/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
4ca21000-4ca26000 r-xp 00000000 03:03 238310     /lib/libcrypt-2.2.4.so
4ca26000-4ca27000 rw-p 00004000 03:03 238310     /lib/libcrypt-2.2.4.so
4ca4e000-4ca5c000 r-xp 00000000 03:03 238346     /lib/libresolv-2.2.4.so
4ca5c000-4ca5e000 rw-p 0000d000 03:03 238346     /lib/libresolv-2.2.4.so

Local Time = Tue Dec 11 14:53:01 2001
Elapsed Time = 76
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
#

Would someone please help me out with this? 
- Is it at all possible to run this on linux? Could someone please give a
sample configuration that is stable?
All I need to do i run lots of "New Java" commands from php.

Thanks in advance,

Guido


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-14 11:44 UTC] jean-pierre dot cartal at nextenso dot com
Hi,

My setup is very close to yours (RH 7.2, Tomcat 3.2.3, JDK 1.3.1_02)
PHP compiled using '--with-java --with-servlet', no other option.

I've tried both 4.0.6 and 4.1.1 versions and had the same problem, though it was happening on the first or second request to jinfo.php

However, I noticed that increasing the -Xmx value with version 4.0.6 improved things as I was able to make more requests (~ 20) before the JVM crashed, but I could not reproduce this behaviour with version 4.1.1.
 [2002-01-14 14:42 UTC] doc at punkass dot com
After messing aroud with various unixes and jdk's we rewrote our app in jsp. Current version php/java (4.1.1) is just not stable under unix with a heavy load.
 [2002-02-15 10:19 UTC] inigo at marketing dot net dot uk
I'm having a very similar problem on Solaris.

Platform:

Solaris 8
Tomcat 4.01
JDK 1.3.1
PHP 4.1.0

I have a PHP file that consists of:
   <?php phpinfo(); ?>

Whenever I request it, I get the error:


An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xf15e71b4
Function name=Java_net_php_reflect_setEnv
Library=/usr/local/lib/php/libphp4.so

Current Java thread:
	at net.php.servlet.send(Native Method)
	at net.php.servlet.service(servlet.java:162)
	at net.php.servlet.service(servlet.java:180)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
	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:201)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	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:2344)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	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:462)
	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:163)
	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:1011)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
	at java.lang.Thread.run(Thread.java:484)

Dynamic libraries:
0x10000 	/usr/java/bin/../bin/sparc/native_threads/java
0xff340000 	/usr/lib/libthread.so.1
0xff380000 	/usr/lib/libdl.so.1
0xff200000 	/usr/lib/libc.so.1
0xff320000 	/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
0xfe480000 	/usr/java1.3.1/jre/lib/sparc/client/libjvm.so
0xff2d0000 	/usr/lib/libCrun.so.1
0xff1d0000 	/usr/lib/libsocket.so.1
0xff100000 	/usr/lib/libnsl.so.1
0xff0d0000 	/usr/lib/libm.so.1
0xff300000 	/usr/lib/libw.so.1
0xff0b0000 	/usr/lib/libmp.so.2
0xff080000 	/usr/java1.3.1/jre/lib/sparc/native_threads/libhpi.so
0xff050000 	/usr/java1.3.1/jre/lib/sparc/libverify.so
0xfe440000 	/usr/java1.3.1/jre/lib/sparc/libjava.so
0xff020000 	/usr/java1.3.1/jre/lib/sparc/libzip.so
0xfaee0000 	/usr/java1.3.1/jre/lib/sparc/libnet.so
0xface0000 	/usr/lib/nss_files.so.1
0xf1580000 	/usr/local/lib/php/libphp4.so
0xf2c50000 	/usr/lib/libz.so.1
0xf2d30000 	/usr/lib/libcrypt_i.so.1
0xf23b0000 	/usr/lib/libresolv.so.2
0xf21e0000 	/usr/lib/libpam.so.1
0xf21a0000 	/usr/local/mysql/lib/mysql/libmysqlclient.so.10
0xf20e0000 	/usr/lib/libgen.so.1
0xf20c0000 	/usr/local/lib/libgcc_s.so.1

Local Time = Fri Feb 15 15:01:23 2002
Elapsed Time = 32
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
#
 [2002-02-24 06:15 UTC] yohgaki@php.net
Please test with  PHP 4.1.1+JDK 1.2 and report the result back 
Please do not forget  updating PHP version. Thanks.
 [2002-03-25 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-06-27 10:22 UTC] jarekl at pi dot net dot pl
Same bug, same problems, other PHP version ... after few reloads of page JVM crashes.

Linux Slackware
Tomcat 4.04
J2SDK 1.4.0
jakarta servlet api
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 09:01:24 2020 UTC