You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Sven Doerr <do...@time4you.de> on 2004/02/16 16:42:24 UTC

workaround for tomcat 4 crash with ibm jvm 1.4.1

workaround for tomcat 4 crash with ibm jvm 1.4.1
------------------------------------------------

i have read in several mailing lists of people reporting
random crashes of the ibm jvm 1.4.1 with tomcat 4.

it seems a problem results from an optimization bug in the jitc.

in the following you find a descripion of how to reproduce the crash
and a possible workaround.


environment
-----------

- jakarta-tomcat-4.1.24-LE-jdk14
- java version "1.4.1" 
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1) (SR1)
  Classic VM (build 1.4.1, J2RE 1.4.1 IBM build cxia321411-20030930 (JIT enabled: jitc))

i suppose the following parameters are not essential:
- SuSE Linux 8.2 (i586)
- Linux pc 2.4.20-64GB-SMP #1 SMP Thu Jul 10 17:28:06 UTC 2003 i686 unknown unknown GNU/Linux
- Intel(R) Pentium(R) 4 CPU 2.80GHz


how to reproduce the crash
--------------------------

start tomcat after:
  export IBM_MIXED_MODE_THRESHOLD=0

(this tells the jvm to compile everything immediately.
otherwise you would have to send hundreds of the http requests
until the compile and then the crash happens.)

send this http request (e.g. by  telnet localhost 8000):
GET / HTTP/1.0
Content-length: 1


compile trace before crash:
Compiling       {org/apache/coyote/http11/Http11Processor}{prepareRequest} Full-compile 
0x0x43a379e4    {org/apache/coyote/http11/Http11Processor}{prepareRequest}
Compiling       {org/apache/tomcat/util/buf/MessageBytes}{equals} Full-compile 
0x0x43a3daf4    {org/apache/tomcat/util/buf/MessageBytes}{equals}
Compiling       {org/apache/tomcat/util/buf/CharChunk}{equals} Full-compile 
0x0x43a3e07c    {org/apache/tomcat/util/buf/CharChunk}{equals}
Compiling       {org/apache/tomcat/util/buf/ByteChunk}{startsWithIgnoreCase} Full-compile 
0x0x43a3e62c    {org/apache/tomcat/util/buf/ByteChunk}{startsWithIgnoreCase}
Compiling       {org/apache/tomcat/util/buf/Ascii}{toLower} Full-compile 
0x0x43a3ede4    {org/apache/tomcat/util/buf/Ascii}{toLower}
Compiling       {org/apache/tomcat/util/buf/Ascii}{parseInt} Full-compile 
JVMDG217: Dump Handler is Processing a Signal - Please Wait.
JVMDG303: JVM Requesting Java core file
JVMDG304: Java core file written to /home/tmp/IBTSERVER/crash/javacore.20040216.155855.32211.txt
JVMDG215: Dump Handler has Processed Exception Signal 11.

typical current thread details at crash:
3XMTHREADINFO      "Thread-11" (TID:0x10587188, sys_thread_t:0x81E02A8, state:R, native ID:0x7001D)
prio=5
4XESTACKTRACE          at org.apache.tomcat.util.buf.ByteChunk.getInt(ByteChunk.java(Compiled Code))
4XESTACKTRACE          at org.apache.tomcat.util.buf.MessageBytes.getInt(MessageBytes.java(Compiled
Code))
4XESTACKTRACE          at org.apache.coyote.Request.getContentLength(Request.java(Compiled Code))
4XESTACKTRACE          at
org.apache.coyote.http11.Http11Processor.prepareRequest(Http11Processor.java(Compiled Code))
4XESTACKTRACE          at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java(Compiled Code))
4XESTACKTRACE          at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java(Compiled
Code))
4XESTACKTRACE          at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java(Compiled Code))
4XESTACKTRACE          at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java(Compiled Code))
4XESTACKTRACE          at java.lang.Thread.run(Thread.java(Compiled Code))


workaround
----------

it is sufficient to disable optimiziation of the Ascii.parseInt method only:

export JITC_COMPILEOPT=NALL{org/apache/tomcat/util/buf/Ascii}{parseInt}




-- 
sven dörr

time4you GmbH
communication & learning

http://www.time4you.de

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org