You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim Miller <ti...@cgi.com> on 2007/06/29 16:09:47 UTC

An unrecoverable stack overflow has occurred.

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.
Thanks
Tim Miller. 
 

-- 
View this message in context: http://www.nabble.com/An-unrecoverable-stack-overflow-has-occurred.-tf4000042.html#a11360789
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: An unrecoverable stack overflow has occurred.

Posted by Tim Miller <ti...@cgi.com>.
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. 
Thanks for your help!
Tim.



Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Tim,
> 
> Tim Miller wrote:
>> I gave that a shot, it didn't seem to matter.  after a couple of minutes
>> of
>> normal flow through the app, it crashed again.
> 
> Wow, you're talking about a REAL crash:
> 
>> #
>> # An unexpected error has been detected by HotSpot Virtual Machine:
>> #
>> #  EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x080ad956, pid=1800,
>> tid=1876
> 
> I thought you meant that you got a StackOverflowException, which usually
> means that your code exhibits runaway recursion. In this case (a JVM
> crash), something worse is happening.
> 
> Is it possible to try a newer version of the JVM? Perhaps one of the 1.5
> series? I recently switched from 1.4.2 to 1.5 without any growing pains
> (but I have a relatively simple webapp, so YMMV). It's worth checking
> out because you might have found some obscure bug in the VM... which
> probably will never be fixed (you're 2 versions out of date according to
> Sun).
> 
> - -chris
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGhSz19CaO5/Lv0PARAhtuAJwMjgdmCHXYirjrrZrTMk3muQhyYgCdFZAv
> 1rB48PepZ2elryE5sQgrHAQ=
> =e/50
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/An-unrecoverable-stack-overflow-has-occurred.-tf4000042.html#a11410659
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: An unrecoverable stack overflow has occurred.

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim,

Tim Miller wrote:
> I gave that a shot, it didn't seem to matter.  after a couple of minutes of
> normal flow through the app, it crashed again.

Wow, you're talking about a REAL crash:

> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x080ad956, pid=1800,
> tid=1876

I thought you meant that you got a StackOverflowException, which usually
means that your code exhibits runaway recursion. In this case (a JVM
crash), something worse is happening.

Is it possible to try a newer version of the JVM? Perhaps one of the 1.5
series? I recently switched from 1.4.2 to 1.5 without any growing pains
(but I have a relatively simple webapp, so YMMV). It's worth checking
out because you might have found some obscure bug in the VM... which
probably will never be fixed (you're 2 versions out of date according to
Sun).

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGhSz19CaO5/Lv0PARAhtuAJwMjgdmCHXYirjrrZrTMk3muQhyYgCdFZAv
1rB48PepZ2elryE5sQgrHAQ=
=e/50
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: An unrecoverable stack overflow has occurred.

Posted by Tim Miller <ti...@cgi.com>.

I gave that a shot, it didn't seem to matter.  after a couple of minutes of
normal flow through the app, it crashed again.

I did find the following info that i wasn't previously aware of.  Every time
it crashes, this file is produced in 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]


I am researching this at the moment, does it ring any bells with you?
Thanks,
Tim.


mgainty wrote:
> 
> Tim--
> what happens when you double the JAVA_OPTS ThreadStackSize
> from
> -XX:ThreadStackSize=512
> to
> -XX:ThreadStackSize=1024
> http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
> 
> Anyone else?
> M--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> ----- Original Message ----- 
> From: "Tim Miller" <ti...@cgi.com>
> To: <us...@tomcat.apache.org>
> Sent: Friday, June 29, 2007 10:09 AM
> Subject: An unrecoverable stack overflow has occurred.
> 
> 
>>
>> 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.
>> Thanks
>> Tim Miller.
>>
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/An-unrecoverable-stack-overflow-has-occurred.-tf4000042.html#a11360789
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/An-unrecoverable-stack-overflow-has-occurred.-tf4000042.html#a11361995
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: An unrecoverable stack overflow has occurred.

Posted by Martin Gainty <mg...@hotmail.com>.
Tim--
what happens when you double the JAVA_OPTS ThreadStackSize
from
-XX:ThreadStackSize=512
to
-XX:ThreadStackSize=1024
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

Anyone else?
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Tim Miller" <ti...@cgi.com>
To: <us...@tomcat.apache.org>
Sent: Friday, June 29, 2007 10:09 AM
Subject: An unrecoverable stack overflow has occurred.


>
> 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.
> Thanks
> Tim Miller.
>
>
> -- 
> View this message in context: 
> http://www.nabble.com/An-unrecoverable-stack-overflow-has-occurred.-tf4000042.html#a11360789
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org