tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl" <>
Subject Re: Tomcat dies suddenly
Date Fri, 12 Feb 2010 19:42:22 GMT

Great ideas (did you see Chris's response with a way of testing the exit 

Of course I am willing to add some debug code (I'll do almost anything at 
this point)... I will look at the links you provided and try it out.  I've 
contented right along that the major issue is that the failure leaves no 
tracks... I'm hopeful the 'debug' code you have suggested will allow me to 
start to understand the underlying cause.  I will leave the security manager 
to last as I don't know that stuff very well.

There is no native code in the application (used to do a lot of work in C 
and I am familiar with mayhem of buffer overruns, pointer screwups, etc.)



----- Original Message ----- 
From: "Peter Crowther" <>
To: "Tomcat Users List" <>
Sent: Friday, February 12, 2010 12:05 PM
Subject: Re: Tomcat dies suddenly

On 12 February 2010 16:43, Carl <> wrote:
> 1. There is no place in the code that we intentionally put an exit(). I
> have grepped for exit() and found nothing. The system stops in a different
> place every time... the last entry in catalina.out has never been the same
> (over 15-20 failures.)

I'm wondering about a concurrency issue, given that the failure occurs
more frequently under load but can occur at other times.  But it's
difficult to think of one that would cause a silent crash like this,
unless you're using a library somewhere that makes use of the "crash
and burn" school of error handling!

... actually, that's a thought.  There *is* a way of you
distinguishing the VM exiting in an orderly fashion, quitting, or
being terminated, and that's to add a tiny webapp that just registers
a shutdown hook
 If you're willing to add that debug code, then you could log a
message (or simply touch a file).  If there's no message/file, the VM
is shutting down due to an error or someone's calling halt

As another small piece of debugging, it would be very interesting to
capture the exit status of the JVM.  How are you starting it, and is
there any chance of inspecting the code on exit?  A non-zero exit
code, in particular, would be interesting.

As a third, rather larger, piece of debugging, you could consider
running Tomcat under a security manager that allowed all operations
except exit.  This may be tough to get right, especially on a
production server, but it would definitely tell you whether there were
any Java calls to Runtime.exit() or Runtime.halt().

Finally, is there any native code in any part of your application?
This is, of course, outside of any of the JVM handlers; a failure of
native code can (and occasionally does!) cause mayhem.

None of this is a solution, I'm afraid.  It's all just more debugging
and gathering more information.  But the problem is sufficiently
unusual that I think you're going to have to keep on debugging it :-(.

- Peter

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message