php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16914 Function zend_hash_index_update_or_next_insert crashes Tomcat.
Submitted: 2002-04-29 14:48 UTC Modified: 2002-10-25 01:00 UTC
Votes:24
Avg. Score:4.8 ± 0.6
Reproduced:23 of 23 (100.0%)
Same Version:3 (13.0%)
Same OS:6 (26.1%)
From: Jakub dot Gnat at webdynamix dot de Assigned:
Status: No Feedback Package: Servlet related
PHP Version: 4.2.0 OS: SuSe Linux 7.3
Private report: No CVE-ID: None
 [2002-04-29 14:48 UTC] Jakub dot Gnat at webdynamix dot de
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4c5e00f8
Function name=zend_hash_index_update_or_next_insert
Library=/usr/local/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:92)
	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)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java)
	at org.apache.tomcat.core.Handler.service(Handler.java)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java)
	at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
	at java.lang.Thread.run(Thread.java:479)

Dynamic libraries:
08048000-0804c000 r-xp 00000000 03:02 131867     /usr/local/jdk1.3.1/bin/i386/native_threads/java
0804c000-0804d000 rw-p 00003000 03:02 131867     /usr/local/jdk1.3.1/bin/i386/native_threads/java
40000000-40014000 r-xp 00000000 03:02 357650     /lib/ld-2.2.4.so
40014000-40015000 rw-p 00013000 03:02 357650     /lib/ld-2.2.4.so
40016000-40017000 r--p 00000000 03:02 601481     /usr/lib/locale/en_US/LC_IDENTIFICATION
40017000-40018000 r--p 00000000 03:02 650279     /usr/lib/locale/en_US/LC_MEASUREMENT
40018000-40019000 r--p 00000000 03:02 260134     /usr/lib/locale/en_US/LC_TELEPHONE
40019000-4001a000 r--p 00000000 03:02 260129     /usr/lib/locale/en_US/LC_ADDRESS
4001a000-4001b000 r--p 00000000 03:02 260133     /usr/lib/locale/en_US/LC_NAME
4001b000-4001c000 r--p 00000000 03:02 812834     /usr/lib/locale/en_US/LC_PAPER
4001c000-4001d000 r--p 00000000 03:02 406419     /usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
4001d000-4001e000 r--p 00000000 03:02 650280     /usr/lib/locale/en_US/LC_MONETARY
4001e000-40024000 r--p 00000000 03:02 113833     /usr/lib/locale/en_US/LC_COLLATE
40024000-40025000 r--p 00000000 03:02 601482     /usr/lib/locale/en_US/LC_TIME
40025000-40026000 r--p 00000000 03:02 65067      /usr/lib/locale/en_US/LC_NUMERIC
40026000-40028000 r--s 00000000 03:02 180491     /opt/jakarta/lib/jaxp.jar
40028000-40036000 r-xp 00000000 03:02 357672     /lib/libpthread.so.0
40036000-4003e000 rw-p 0000d000 03:02 357672     /lib/libpthread.so.0
4003e000-40047000 r-xp 00000000 03:02 604049     /usr/local/jdk1.3.1/jre/lib/i386/native_threads/libhpi.so
40047000-40048000 rw-p 00008000 03:02 604049     /usr/local/jdk1.3.1/jre/lib/i386/native_threads/libhpi.so
40048000-403c8000 r-xp 00000000 03:02 961678     /usr/local/jdk1.3.1/jre/lib/i386/server/libjvm.so
403c8000-4051d000 rw-p 0037f000 03:02 961678     /usr/local/jdk1.3.1/jre/lib/i386/server/libjvm.so
40536000-40538000 r-xp 00000000 03:02 357660     /lib/libdl.so.2
40538000-4053a000 rw-p 00001000 03:02 357660     /lib/libdl.so.2
4053a000-40655000 r-xp 00000000 03:02 357656     /lib/libc.so.6
40655000-4065c000 rw-p 0011a000 03:02 357656     /lib/libc.so.6
40660000-40672000 r-xp 00000000 03:02 357663     /lib/libnsl.so.1
40672000-40674000 rw-p 00011000 03:02 357663     /lib/libnsl.so.1
40677000-40698000 r-xp 00000000 03:02 357661     /lib/libm.so.6
40698000-40699000 rw-p 00020000 03:02 357661     /lib/libm.so.6
40699000-406d2000 r-xp 00000000 03:02 552785     /usr/lib/libstdc++-libc6.1-1.so.2
406d2000-406de000 rw-p 00038000 03:02 552785     /usr/lib/libstdc++-libc6.1-1.so.2
406e1000-406f2000 r-xp 00000000 03:02 278962     /usr/local/jdk1.3.1/jre/lib/i386/libverify.so
406f2000-406f4000 rw-p 00010000 03:02 278962     /usr/local/jdk1.3.1/jre/lib/i386/libverify.so
406f4000-40715000 r-xp 00000000 03:02 278963     /usr/local/jdk1.3.1/jre/lib/i386/libjava.so
40715000-40717000 rw-p 00020000 03:02 278963     /usr/local/jdk1.3.1/jre/lib/i386/libjava.so
40718000-4072c000 r-xp 00000000 03:02 278964     /usr/local/jdk1.3.1/jre/lib/i386/libzip.so
4072c000-4072f000 rw-p 00013000 03:02 278964     /usr/local/jdk1.3.1/jre/lib/i386/libzip.so
4072f000-41463000 r--s 00000000 03:02 636605     /usr/local/jdk1.3.1/jre/lib/rt.jar
41490000-41787000 r--s 00000000 03:02 636606     /usr/local/jdk1.3.1/jre/lib/i18n.jar
41787000-4179d000 r--s 00000000 03:02 636593     /usr/local/jdk1.3.1/jre/lib/sunrsasign.jar
43845000-4384c000 r--s 00000000 03:02 180749     /opt/jakarta/lib/bsfengines.jar
4384c000-4384f000 r--s 00000000 03:02 1026543    /opt/jakarta/lib/phpsrvlt.jar
4384f000-43850000 r--s 00000000 03:02 180753     /opt/jakarta/lib/sax-bugfix.jar
4b8cf000-4b8fa000 r--p 00000000 03:02 65062      /usr/lib/locale/en_US/LC_CTYPE
4b8fa000-4ba68000 r--s 00000000 03:02 180746     /opt/jakarta/lib/aaa_xerces_1_2.jar
4ba68000-4bab2000 r--s 00000000 03:02 180490     /opt/jakarta/lib/ant.jar
4bab2000-4bade000 r--s 00000000 03:02 180747     /opt/jakarta/lib/ant_1_1.jar
4bade000-4baeb000 r--s 00000000 03:02 180748     /opt/jakarta/lib/bsf.jar
4baeb000-4bb20000 r--s 00000000 03:02 180750     /opt/jakarta/lib/cocoon.jar
4bb20000-4bc49000 r--s 00000000 03:02 180751     /opt/jakarta/lib/fesi.jar
4bc49000-4bce9000 r--s 00000000 03:02 180752     /opt/jakarta/lib/fop_0_15_0.jar
4bce9000-4bd04000 r--s 00000000 03:02 181598     /opt/jakarta/lib/mm.mysql-2.0.4-bin.jar
4bd04000-4bd26000 r--s 00000000 03:02 180492     /opt/jakarta/lib/parser.jar
4bd26000-4bd30000 r--s 00000000 03:02 180493     /opt/jakarta/lib/servlet.jar
4bd30000-4bd3a000 r--s 00000000 03:02 180754     /opt/jakarta/lib/servlet_2_2.jar
4bd3a000-4bd4a000 r--s 00000000 03:02 180755     /opt/jakarta/lib/stylebook-1.0-b2.jar
4bd4a000-4c1ca000 r--s 00000000 03:02 733106     /usr/local/jdk1.3.1/lib/tools.jar
4c1ca000-4c1e3000 r--s 00000000 03:02 180757     /opt/jakarta/lib/turbine-pool.jar
4c1e3000-4c203000 r--s 00000000 03:02 180758     /opt/jakarta/lib/w3c.jar
4c203000-4c2e1000 r--s 00000000 03:02 181597     /opt/jakarta/lib/xalan.jar
4c2e1000-4c34c000 r--s 00000000 03:02 180759     /opt/jakarta/lib/xalan_1_2_D02.jar
4c34c000-4c4f3000 r--s 00000000 03:02 181592     /opt/jakarta/lib/xercesImpl.jar
4c4f3000-4c514000 r--s 00000000 03:02 180760     /opt/jakarta/lib/xml.jar
4c514000-4c56b000 r--s 00000000 03:02 180761     /opt/jakarta/lib/xt.jar
4c56b000-4c574000 r-xp 00000000 03:02 278967     /usr/local/jdk1.3.1/jre/lib/i386/libnet.so
4c574000-4c575000 rw-p 00008000 03:02 278967     /usr/local/jdk1.3.1/jre/lib/i386/libnet.so
4c587000-4c590000 r-xp 00000000 03:02 357667     /lib/libnss_files.so.2
4c590000-4c591000 rw-p 00008000 03:02 357667     /lib/libnss_files.so.2
4c591000-4c6b0000 r-xp 00000000 03:02 1010564    /usr/local/lib/php/libphp4.so
4c6b0000-4c6c0000 rw-p 0011e000 03:02 1010564    /usr/local/lib/php/libphp4.so
4c6d1000-4c6d8000 r-xp 00000000 03:02 357683     /lib/libpam.so.0.75
4c6d8000-4c6da000 rw-p 00006000 03:02 357683     /lib/libpam.so.0.75
4c6da000-4c6df000 r-xp 00000000 03:02 357657     /lib/libcrypt.so.1
4c6df000-4c6e0000 rw-p 00004000 03:02 357657     /lib/libcrypt.so.1
4c707000-4c715000 r-xp 00000000 03:02 357673     /lib/libresolv.so.2
4c715000-4c716000 rw-p 0000d000 03:02 357673     /lib/libresolv.so.2

Local Time = Mon Apr 29 18:33:11 2002
Elapsed Time = 56
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Server VM (1.3.1_03-b03 mixed mode)
#



It happens when I use native_threads but I can not try green_threads because I can not compile PHP to work with them. I trying to compile when I change jvm.cfg to -classic on the first place then I get another error 

Error: 500
Location: /examples/php-servlet/index.php
Internal Servlet Error:

java.lang.UnsatisfiedLinkError: /usr/local/lib/php/libphp4.so: /usr/local/lib/php/libphp4.so: undefined symbol: pthread_getspecific
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
....

My environment: 
Suse Linux 7.3 OS=Linux 2.4.10-4GB on i386 
Tomcat 3.2.3 I use only Tomcat as web server without apache. 
Java version=1.3.1_03 
Java vendor=Sun Microsystems Inc. 
PHP 4.2.0


'./configure' '--disable-debug' '--enable-tracks-vars' '--with-apxs=/usr/local/apache/bin/apxs' '--with-servlet' '--with-java'

Help!!!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-29 14:10 UTC] phil at adigital dot com dot mx
Same on Linux 7.2
JVM 1.4.1
Tomcat 4.0.3

it seems something is definitively wrong with phpinfo()..
Always crashes the server with an 11 signal (SEGMENTATION VIOLATION)

Hope it will be checked ASAP !!!!
 [2002-10-09 11:30 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, 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".
 [2003-01-03 04:19 UTC] g dot tanzilli at gruppocsf dot com
Same problem with php-4.3.0 tomcat 4.1.18 sun jdk 1.4.1

php 4.3 do not compile with --with-servlet, I had to fix the makefile, opened another bug few days ago (http://bugs.php.net/?id=21291&edit=2)
 [2004-12-21 11:39 UTC] ben_d_gill at hotmail dot com
I get this as well - I have tried the php-4-snapshot from last night (21/12/04)..

I am running Fedora Core 2 on x86, have tomcat jakarta-tomcat-5.5.3, tried jdk 1.4.2 and 1.5 (tried building php using both as well) and it keeps crashing...

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x03d506e3, pid=25823, tid=59587504
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-rc-b63 mixed mode, sharing)
# Problematic frame:
# C  [libphp4.so+0xf56e3]  zend_hash_index_update_or_next_insert+0x2f
#
# An error report file with more information is saved as hs_err_pid25823.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp

Stack: [0x03853000,0x038d4000),  sp=0x038d2c00,  free space=511k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libphp4.so+0xf56e3]  zend_hash_index_update_or_next_insert+0x2f
C  [libphp4.so+0x106de3]  Java_net_php_reflect_setResultFromObject+0xb3
j  net.php.reflect.setResultFromObject(JLjava/lang/Object;)V+0
j  net.php.reflect.setResult(JLjava/lang/Object;)V+271
j  net.php.servlet.readCookies()Ljava/lang/String;+10
v  ~StubRoutines::call_stub
V  [libjvm.so+0x1688ec]
V  [libjvm.so+0x257378]
V  [libjvm.so+0x16871f]
V  [libjvm.so+0x18a3d3]
V  [libjvm.so+0x174e3a]
C  [libphp4.so+0x1054b9]
C  [libphp4.so+0xca7bc]  sapi_activate+0x178
C  [libphp4.so+0xc39e0]  php_request_startup+0x144
C  [libphp4.so+0x105991]  Java_net_php_servlet_send+0x2dd
j  net.php.servlet.send(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Z)V+0
j  net.php.servlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;)V+52
j  net.php.servlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+24
j  javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
j  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+478
j  org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
j  org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+667
j  org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+285
j  org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
j  org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
j  org.apache.catalina.valves.AccessLogValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+10
j  org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
j  org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+141
j  org.apache.coyote.http11.Http11Processor.process(Ljava/io/InputStream;Ljava/io/OutputStream;)V+424
j  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+113
j  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Ljava/net/Socket;Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+45
j  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt([Ljava/lang/Object;)V+102
j  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()V+167
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
 [2004-12-21 11:39 UTC] ben_d_gill at hotmail dot com
I get this as well - I have tried the php-4-snapshot from last night (21/12/04)..

I am running Fedora Core 2 on x86, have tomcat jakarta-tomcat-5.5.3, tried jdk 1.4.2 and 1.5 (tried building php using both as well) and it keeps crashing...

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x03d506e3, pid=25823, tid=59587504
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-rc-b63 mixed mode, sharing)
# Problematic frame:
# C  [libphp4.so+0xf56e3]  zend_hash_index_update_or_next_insert+0x2f
#
# An error report file with more information is saved as hs_err_pid25823.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp

Stack: [0x03853000,0x038d4000),  sp=0x038d2c00,  free space=511k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libphp4.so+0xf56e3]  zend_hash_index_update_or_next_insert+0x2f
C  [libphp4.so+0x106de3]  Java_net_php_reflect_setResultFromObject+0xb3
j  net.php.reflect.setResultFromObject(JLjava/lang/Object;)V+0
j  net.php.reflect.setResult(JLjava/lang/Object;)V+271
j  net.php.servlet.readCookies()Ljava/lang/String;+10
v  ~StubRoutines::call_stub
V  [libjvm.so+0x1688ec]
V  [libjvm.so+0x257378]
V  [libjvm.so+0x16871f]
V  [libjvm.so+0x18a3d3]
V  [libjvm.so+0x174e3a]
C  [libphp4.so+0x1054b9]
C  [libphp4.so+0xca7bc]  sapi_activate+0x178
C  [libphp4.so+0xc39e0]  php_request_startup+0x144
C  [libphp4.so+0x105991]  Java_net_php_servlet_send+0x2dd
j  net.php.servlet.send(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Z)V+0
j  net.php.servlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljava/lang/String;)V+52
j  net.php.servlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+24
j  javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
j  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+478
j  org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
j  org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+667
j  org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+285
j  org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
j  org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
j  org.apache.catalina.valves.AccessLogValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+10
j  org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
j  org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+141
j  org.apache.coyote.http11.Http11Processor.process(Ljava/io/InputStream;Ljava/io/OutputStream;)V+424
j  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+113
j  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Ljava/net/Socket;Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+45
j  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt([Ljava/lang/Object;)V+102
j  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()V+167
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub
 [2005-09-21 14:43 UTC] lee dot mallabone at transactgroup dot net
I can reproduce this problem running Jakarta Tomcat 5.0.28 and PHP 4.4.0.
A page containing just:
<? phpinfo(); ?>

will crash if you hit refresh in your browser several times when the page is being interpreted by the php servlet.

The crash trace for me is just:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xb0d08098, pid=7083, tid=2973621168
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
# Problematic frame:
# C  [libphp4.so+0x12d098]  zend_hash_index_update_or_next_insert+0x28
#
# An error report file with more information is saved as hs_err_pid7083.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted

This looks like the same bug as the original poster (back in 2002). Please let me know if there is anything I can do to help track this bug down and/or get it fixed.
 [2006-07-31 11:24 UTC] cech dot adrian at pobox dot sk
I have same problem not only with phpinfo page, the other pages has same behaviour. My environment: FreeBSD 5.5, PHP4.2.2, Tomcat4.1.31

Adrian
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 29 22:01:30 2024 UTC