php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10271 PHP servlet causes segmentation violation in native code
Submitted: 2001-04-10 16:13 UTC Modified: 2002-04-02 00:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: rthornto at insight dot com Assigned:
Status: No Feedback Package: Java related
PHP Version: 4.0.4pl1 OS: Linux 7.0, Linux 6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rthornto at insight dot com
New email:
PHP Version: OS:

 

 [2001-04-10 16:13 UTC] rthornto at insight dot com
PHP as a servlet causes a (seemingly random) segmentation violation under normal stress conditions.  I've managed to get it running with a 99% stability with Tomcat 3.2.1 and the IBM JDK, but it won't be ready for enterprise use until this bug is resolved.  It appears to occur sometime after the method php_execute_script() is called and before or during the series of calls to ub_write().  Below is a typical java core dump of the java and native methods, but it isn't the same every time:


Mon Apr  9 19:48:44 2001

SIGSEGV received at 14458be5 in unknown. Processing terminated.
J2RE 1.3.0 IBM build cx130-20010207
/opt/IBMJava2-13/jre/bin/exe/java -Djava.library.path=/usr/local/lib -Dtomcat.home=/var/tomcat org.apache.tomcat.startup.Tomcat 

System Properties
-----------------
Java Home Dir:	/opt/IBMJava2-13/jre
Java DLL Dir:	/opt/IBMJava2-13/jre/bin
Sys Classpath:	/opt/IBMJava2-13/jre/lib/rt.jar:/opt/IBMJava2-13/jre/lib/i18n.jar:/opt/IBMJava2-13/jre/classes
User Args:
	-Djava.class.path=/var/tomcat/lib/ant.jar:/var/tomcat/lib/jasper.jar:/var/tomcat/lib/jaxp.jar:/var/tomcat/lib/parser.jar:/var/tomcat/lib/servlet.jar:/var/tomcat/lib/test:/var/tomcat/lib/webserver.jar:/opt/IBMJava2-13/lib/tools.jar:.:/var/tomcat/lib/servlet.jar
	-Djava.library.path=/usr/local/lib
	-Dtomcat.home=/var/tomcat


Current Thread Details
----------------------

    "Thread-44" (TID:0x402e7438, sys_thread_t:0x45330030, state:R, native ID:0xd436) prio=5
	at net.php.servlet.send(Native Method)
	at net.php.servlet.service(servlet.java:172)
	at net.php.servlet.service(servlet.java:191)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	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:498)


	 ----- Native Stack -----
-------------------------------------------------------------------------
Operating Environment
---------------------
OS Level	: 2.2.14-5.0smp.#1 SMP Tue Mar 7 21:01:40 EST 2000
glibc Version	: 2.1.3
No. of Procs	: 2
Memory Info:
        total:    used:    free:  shared: buffers:  cached:
Mem:  263827456 114450432 149377024 22102016 20566016 56348672
Swap: 538927104        0 538927104
MemTotal:    257644 kB
MemFree:     145876 kB
MemShared:    21584 kB
Buffers:      20084 kB
Cached:       55028 kB
BigTotal:         0 kB
BigFree:          0 kB
SwapTotal:   526296 kB
SwapFree:    526296 kB

User Limits (in bytes except for NOFILE and NPROC) -
	RLIMIT_FSIZE	: infinity
	RLIMIT_DATA	: infinity
	RLIMIT_STACK	: 2088960
	RLIMIT_CORE	: 0
	RLIMIT_NOFILE	: 1024
	RLIMIT_NPROC	: 2048

Application Environment
-----------------------
Signal Handlers - 
	SIGQUIT		: intrDispatchMD (libhpi.so)
	SIGILL		: intrDispatchMD (libhpi.so)
	SIGTRAP		: intrDispatchMD (libhpi.so)
	SIGABRT		: intrDispatchMD (libhpi.so)
	SIGFPE		: intrDispatchMD (libhpi.so)
	SIGBUS		: intrDispatchMD (libhpi.so)
	SIGSEGV		: intrDispatchMD (libhpi.so)
	SIGUSR1		: sigusr1Handler (libhpi.so)

Environment Variables -
LESSOPEN=|/usr/bin/lesspipe.sh %s
USERNAME=root
TOMCAT_HOME=/var/tomcat
LOGNAME=root
JAVAHOME=/opt/IBMJava2-13/jre
LD_LIBRARY_PATH=/opt/IBMJava2-13/jre/bin:/opt/IBMJava2-13/jre/bin/classic:
CLASSPATH=/var/tomcat/lib/ant.jar:/var/tomcat/lib/jasper.jar:/var/tomcat/lib/jaxp.jar:/var/tomcat/lib/parser.jar:/var/tomcat/lib/servlet.jar:/var/tomcat/lib/test:/var/tomcat/lib/webserver.jar:/opt/IBMJava2-13/lib/tools.jar:.:/var/tomcat/lib/servlet.jar
TERM=vt100
HOSTTYPE=i386
PATH=/opt/IBMJava2-13/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/sbin:/usr/sbin:/usr/iei/bin:.:/home/rthornto/bin
HOME=/home/rthornto
SHELL=/bin/bash
USER=root
JAVA_HOME=/opt/IBMJava2-13
LANG=en_US
HISTFILE=/home/rthornto/.bash_history
OSTYPE=Linux
TOMCAT_OPTS=-Djava.library.path=/usr/local/lib
SHLVL=2
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
IBM_JAVA_COMMAND_LINE=/opt/IBMJava2-13/jre/bin/exe/java -Djava.library.path=/usr/local/lib -Dtomcat.home=/var/tomcat org.apache.tomcat.startup.Tomcat 

Full Thread Dump
----------------

    "Thread-44" (TID:0x402e7438, sys_thread_t:0x45330030, state:R, native ID:0xd436) prio=5
	at net.php.servlet.send(Native Method)
	at net.php.servlet.service(servlet.java:172)
	at net.php.servlet.service(servlet.java:191)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	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:498)


	 ----- Native Stack -----
-------------------------------------------------------------------------

    "Thread-43" (TID:0x402e7480, sys_thread_t:0x4532fc28, state:S, native ID:0xd035) prio=5
	at net.php.servlet.send(Native Method)
	at net.php.servlet.service(servlet.java:172)
	at net.php.servlet.service(servlet.java:191)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	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:498)


	 ----- Native Stack -----
	add_string_to_string at 0x451e07dd in libphp4.so
	execute at 0x451d4ef9 in libphp4.so
	zend_execute_scripts at 0x451e388c in libphp4.so
	php_execute_script at 0x451f8411 in libphp4.so
	Java_net_php_servlet_send at 0x451f53b6 in libphp4.so
	??
	ivq_doinvoke_V__ at 0x4020f866 in libjvm.so
	ivqw_doinvoke_V__ at 0x40210167 in libjvm.so
	iiq_doinvoke_V__ at 0x4020fc97 in libjvm.so
	ivq_doinvoke_V__ at 0x4020f866 in libjvm.so
	invq_doinvoke_V__ at 0x4020f95d in libjvm.so
	ivqw_doinvoke_V__ at 0x40210167 in libjvm.so
	invq_doinvoke_V__ at 0x4020f95d in libjvm.so
	ivq_doinvoke_V__ at 0x4020f866 in libjvm.so
	iiq_doinvoke_V__ at 0x4020fc97 in libjvm.so
	iiq_doinvoke_V__ at 0x4020fc97 in libjvm.so
	iiq_doinvoke_V__ at 0x4020fc97 in libjvm.so
	EJivq_doinvoke_V__ at 0x4020aa29 in libjvm.so
	??
-------------------------------------------------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-24 06:07 UTC] yohgaki@php.net
Please test with  PHP 4.1.1+JDK 1.2 and report the result back Thanks.
 [2002-04-02 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".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 16:01:31 2025 UTC