Pages

Saturday, June 21, 2014

Puting your IBM JRE in a zombie state

Sometimes after a crash or a particularly insidious event the JVM terminates. There could be a number of reasons for this .. OOM, JNI crashes, system exits etc.,

If you want your JVM to stick around i.e. not exit then use this -Xdump option
"-Xdump:tool:events=gpf,exec=\"sleep 1d\" -Xdump:what"

We employ techniques like this in the cloud to keep  linux container hosting our app which in this case is the Liberty server + JRE + application bits from disappearing into ether when the JVM terminates.

For details on how we use this with the Liberty profile in the cloud see  https://developer.ibm.com/bluemix/2014/06/18/collecting-diagnostics-crash-2/

For more detail on how to set -Xdump see
http://www-01.ibm.com/support/docview.wss?uid=swg21242497

Happy Debugging,
Rohit

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.