tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: -Xincgc, -Xms600, -Xmx600
Date Tue, 03 Jun 2003 12:56:26 GMT

Howdy,

>Sure, it is possible that the gc could run as long as your process is
>running, but it should stop after your process completes. If tomcat
keeps
>running at 100% cpu forever, you have a problem ... something that
looks
>like an infinite loop.

Could be an infinite loop, or some threads waiting on each other's
locks.  Or maybe something IO-bound?  It's hard to tell without more
information than has been posted.

>All I'm saying is, just upgrading the VM is a waste of time. If it's a
VM
>issue it's not fixed yet ... or it's been reintroduced. Maybe the
answer is
>to do what Hua Hou suggested, upgrade to 1.4.1_02 and replace the
>setLength() method with the 1.3.1_07 version.

I disagree with both parts ;)  "Just upgrading the VM" is a big deal:
many other bugs, including memory- and gc-related, were fixed.

As to what Senor Hou is doing -- that's up to him ;)  Our software
process is much too strict to allow that, and even if the process allow
it I'd never let one of my developers break up the JDK and retrofit it.

>I would like to know this too ... actually any information about what
it is
>doing would be great. I tried to attach the MS debugger ... but had
>problems doing so on NT. Now that I have a W2K installation too, I will
try
>again.

The MS debugger is not worth its weight in lead...

>How do I ctrl-break a service ... or make it dump this information?

I'm not sure how to do this on Windows.  On unix, you send a SIGQUIT to
the process, e.g. via the kill command.  The documentation for the JVM's
-Xrs command:
-Xrs 
Reduces use of operating-system signals by the Java virtual machine
(JVM). This option is available beginning with J2SE 1.3.1. 
In J2SE 1.3.0, the Shutdown Hooks facility was added to allow orderly
shutdown of a Java application. The intent was to allow user cleanup
code (such as closing database connections) to run at shutdown, even if
the JVM terminates abruptly. 

Sun's JVM catches signals to implement shutdown hooks for abnormal JVM
termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the
running of shutdown hooks. 

The JVM uses a similar mechanism to implement the pre-1.2 feature of
dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to
perform thread dumps. 

Applications embedding the JVM frequently need to trap signals like
SIGINT or SIGTERM, which can lead to interference with the JVM's own
signal handlers. To address this issue, the -Xrs command-line option has
been added beginning in J2SE 1.3.1. When -Xrs is used on Sun's JVM, the
signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by
the JVM, and signal handlers for these signals are not installed. 

There are two consequences of specifying -Xrs: 

SIGQUIT thread dumps are not available. 
User code is responsible for causing shutdown hooks to run, for example
by calling System.exit() when the JVM is to be terminated

Maybe this helps if it can be done on windows...

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message