EXCEPTION_STACK_OVERFLOW with Tomcat - service shuts down

Hello,

I get the following error periodically which causes my Tomcat service to stop. There do not seem to be any exceptions listed in my log files, only the "An unrecoverable stack overflow has occurred." error listed in the jakarta_service_yyyymmdd.log file.

I am running tomcat5.5.23 on a windows 2000 machine as a service. I used the service.bat file included with the tomcat downloads to create this service.

I have tried a few things that i dug up while researching this error.

The first time it happened, i increase the values for --JvmMs 128 --JvmMx 256 to --JvmMs 256 --JvmMx 512. It didnt take right away, but the next day, after one crash, the error stopped.

The next time it happened, i found that there may be an issue with Tomcat 5.5 15+ where JSP files are cached - the solution, which worked immediately was to add this to the options "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true"

The third time, I found that there were a lot of bug fixes since the version i was using to the current ( 5.5.20 -> 5.5.23 ). after installing 23, it was fine.

This time, i was asked to increase the session timeout, so i updated the web.xml files and restarted the service - it started failing immediately afterward.

I haven't the slightest idea what could be going on. I have tried using JProfiler and modifying code in an attempt to reduce memory usage, but i don't think that had any effect.

I don't have any problems when running/testing the application locally through Eclipse.. This only occurs on the 'prod' server.

Please help, my users are not pleased.

Listed below is the log entry from the system32 dir :

#

# An unexpected error has been detected by HotSpot Virtual Machine:

#

# EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x080ad956, pid=1800, tid=1876

#

# Java VM: Java HotSpot(TM) Server VM (1.4.2_13-b06 mixed mode)

# Problematic frame:

# V [jvm.dll+0xad956]

#

T H R E A D

Current thread (0x00655068): JavaThread "CompilerThread0" daemon [_thread_in_native, id=1876]

siginfo: ExceptionCode=0xc00000fd, ExceptionInformation=0x00000001 0x545c0ffc

Registers:

EAX=0x55f14810, EBX=0x55f14810, ECX=0x545ff534, EDX=0x00000001

ESP=0x545c1000, EBP=0x00000002, ESI=0x00000000, EDI=0x545ff494

EIP=0x080ad956, EFLAGS=0x00010202

Top of Stack: (sp=0x545c1000)

0x545c1000:55f14810 545ff534 080ada7a 545ff494

0x545c1010:55f14810 545ff494 00000000 00000037

0x545c1020:55ff98cc 545ff534 080ada7a 545ff494

0x545c1030:55f14810 545ff494 00000000 00000001

0x545c1040:55ff988c 545ff534 080ada7a 545ff494

0x545c1050:55ff98cc 545ff494 00000000 00000002

0x545c1060:55ff985c 545ff534 080ada7a 545ff494

0x545c1070:55ff988c 545ff494 00000000 00000001

Instructions: (pc=0x080ad956)

0x080ad946:5e 83 c4 0c c2 04 00 90 90 90 51 53 8b 5c 24 10

0x080ad956:55 8b e9 8b 4b 1c 56 57 8b 7c 24 18 8b d1 89 6c

Stack: [0x545c0000,0x54600000), sp=0x545c1000, free space=4k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

V [jvm.dll+0xad956]

[3272 byte] By [TimmyMillera] at [2007-11-27 9:16:30]
# 1

Hi, i had found some documentation that gave the meaning of some of the text in that error log. They had a suggested workaround that seems to have worked out for the time being. It said to switch to the client jvm rather than the server. As far as I can tell, there is no performance hit or drawback, so i am going to go with this until something else happens.

Tim.

TimmyMillera at 2007-7-12 22:06:18 > top of Java-index,Java HotSpot Virtual Machine,HotSpot Internals...
# 2

Can you try running with a more recent JDK version? (Preferably 1.6, but even 1.5 would be better.) The 1.4.2 JDK is aging and has started the End of Life (EOL) process.

No guarantees (unfortunately!), but there have been numerous stability and performance fixes since 1.4.2.

Finally, can you post the complete hs_err log file?

jxca at 2007-7-12 22:06:18 > top of Java-index,Java HotSpot Virtual Machine,HotSpot Internals...
# 3
Hello,Unfortunately, the problem is in the production environment, so it would be difficult to switch to a newer version of Java - but i will keep this in mind and attempt to do so.Second, that is the complete listing in the err file.Thanks,Tim.
TimmyMillera at 2007-7-12 22:06:18 > top of Java-index,Java HotSpot Virtual Machine,HotSpot Internals...