Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean if JVM is suspended?

When my application run . I got a message says :

Ping: Timed out waiting for signal from JVM.
The JVM was launched with debug options so this may be because the JVM
is currently suspended by a debugger.  Any future timeouts during this
JVM invocation will be silently ignored.

What does that mean? It seems it will block any web request from outside? because when I upload a file to it, it failed. help me .

like image 264
Joe.wang Avatar asked Sep 18 '12 09:09

Joe.wang


3 Answers

When debugging code, one would usually set breakpoints in it in order to break the execution of the program at some point. When the JVM encounters such breakpoint it suspends execution, and waits for the debugger to go further (step into / step over / step out / etc).

If you have an UI Debugger (like Eclipse) attached to your process, you can control the execution flow from there, watch variable values etc.

The message you're seeing, simply says, that the timeout you got, may be simply the result of such situation, and is shown by the Java Service Wrapper, as described here:

The Wrapper will decide that the JVM is using a debugger if the wrapper.java.command property is set to "jdb" or "jdb.exe" or if one of the wrapper.java.additional.<n> properties is set to "-Xdebug".

So it seems you are starting your app using Java Service Wrapper in debug mode, and when some of the timeouts expire, it warns you with the attached message.

like image 122
npe Avatar answered Oct 20 '22 00:10

npe


JVM debug options allow you to connect to the JVM and step through the code (Google java remote debugging for more info). Basically this means that code execution can be paused remotely and controlled (execute one statement at a time, check variable values, etc.). While this is very useful it can of course interfere with normal operation of a piece of software. If you don't intend to run the JVM in debug mode, try to find out what's setting it and remove it (it might be in JAVA_OPTS (environment variable), or it could be in your start-up script or whatever you use to start the JVM. You're looking for a string that looks something like -Xdebug -Xrunjdwp:server=y, transport=dt_socket,address=#number#, suspend=n. Delete all of this, comment it out, or whatever is appropriate for where it's being set, then restart your JVM.

like image 22
Thor84no Avatar answered Oct 19 '22 22:10

Thor84no


What does that mean?

The message is coming from Java Service Wrapper. The wrapper has tried to "ping" the JVM and gotten no response. It most likely means that you are debugging the JVM and have paused it. While the JVM is paused, it cannot respond to external requests of any kind. All threads are frozen ...

It seems it will block any web request from outside? because when I upload a file to it, it failed. help me

Yes, it would do that if you've paused the JVM. Unpause the JVM and it should start responding again.

Note that if you launch the application from an IDE in debug mode, the JVM may start in a paused state ... depending on your IDE settings / launch configurations.


The only other explanation I can think of is that you might have a problem with your network or virtual network configuration (e.g. packet filters or virtual network routing) that is causing large scale lossage of network packets.

like image 42
Stephen C Avatar answered Oct 19 '22 22:10

Stephen C