Diagnostics Guide

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

The Oracle JRockit JVM is Freezing

When the Oracle JRockit JVM or Java application becomes unresponsive but hasn’t crashed, it is considered to be frozen. A frozen system occurs when the application stops answering requests but the process is still there. A system can freeze in either the JVM or the application. Your first action is to determine where it is freezing.

Most often, a JVM freeze requires that you contact Oracle JRockit Support for resolution. This section describes how to diagnose where a system is freezing and how to collect information that will assist the support team resolve your problem.

This section includes information on the following subjects:

 


Diagnosing Where the Freeze is Occurring

To determine whether the freeze is occurring in the application or in the JVM, try to generate a thread dump by doing one of the following:

On all platforms you can also get the thread dump by using jrcmd; for example:

jrcmd nnnn "print_threads nativestack=true"

where nnnn is the PID of the Java process. To get a list of the PIDs of all Java processes running on the machine, run jrcmd without any command line parameters.

The result of the any of these procedures will indicate the kind of freeze happening:

 


Java Application Freeze

An application freeze occurs when something in the Java application causes the system to become unresponsive. This section describes how to handle a Java application freeze. It contains information on the following subjects:

Resolving a Java Application freeze

Here are two ways you can work around a Java application freeze.

If This Did Not Help

If none of the suggested workarounds corrects the situation, you will need to open a case with Oracle Support, according to the process described in Submitting Problems to Oracle Support. When creating a support case for a Java application freeze, you need to include the following information:

 


JVM Freeze

If you cannot get thread dumps with Ctrl-Break or by sending SIGQUIT (kill -3) to the parent Java process PID after a few tries, the JVM has stopped handling signals and is really freezing. When this happens, you should open a case with Oracle Support and work with them to rectify the problem. This section describes the ways you can force the JRockit JVM to crash in order to create the necessary crash file. It contains information on the following subjects:

Collect Information About the JVM Freeze

Since resolving a JVM freeze requires that you open a case with Oracle Support, you need to collect as much information as you can about the state of the process that was running when the JVM froze. Normally, this information would be written to a crash file, but since the JRockit JVM technically hasn’t crashed, that file won’t be created unless you force the JVM to crash. This section explains how to collect the necessary state information based upon your JVM deployment.

Collecting Information on Linux Systems

To collect information for an JRockit JVM running on Linux, use one of these procedures:

Force a Crash with the Diagnostics Command enableforce_crash

On versions of the JRockit JVM later than R25, you can use the command enableforce_crash to force a crash and thus produce a crash file with the necessary state information. Add the following option to the command line and use jrcmd to force a crash:

-Djrockit.ctrlbreak.enableforce_crash=true
Use SIGABRT (modern Linux Systems)

SIGABRT aborts the signal sent to the process and causes a crash, thus producing a crash file. Invoke SIGABRT as described here:

  1. Find the PID of the JRockit JVM process by using the following procedure:
  2. Note: The following instructions are valid on 2.6 kernel-based Linux systems and on Red Hat Enterprise Linux 3.0.
    1. Assuming that the JRockit JVM process runs as the Linux user webadmin, enter the following command:
    2. pstree -p webadmin | grep java
    3. If you get excessive garbage from pstree, try unsetting the LANG environment variable first:
    4. unset LANG
    5. If pstree gives you only one Java process, you're done. Go to step 2.
    6. If pstree gives you several processes, print the command line parameters for any process by entering:
    7. cat /proc/nnnn/cmdline | xargs --null -n1 echo

      (where nnnn is the PID you are interested in; for example, 1234)

  3. Use the command:
  4. ls -l /proc/1234/cwd

    to see where the core file (the core dump crash file) will be created (assuming that the PID is 1234).

  5. Create the core file (and terminate the process) by entering:
  6. ulimit -c unlimited
    kill -SIGABRT 1234

    (again assuming that the PID is 1234).

Collecting Information on Windows Systems

To collect information for JRockit JVM running on Windows, use one of these procedures:

Force a Crash with the Diagnostic Command enableforce_crash

On versions of JRockit JVM later than R25, you can use the diagnostic command enableforce_crash to force a crash and thus produce a crash file with the necessary state information. Add the following option to the command line and use jrcmd to force a crash:

-Djrockit.ctrlbreak.enableforce_crash=true
Use windbg

The windbg command can also create the necessary core file. Enter the command:

windbg.exe -Q -pd -p nnnn -c ".dump /u /ma hung.mdmp; q"

(where nnnn is the PID)

Note: windbg is included in the Debugging Tools for Windows package that you can download from:
Note: http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Collecting State Information if the JRockit JVM is Running as a Service

If the JRockit JVM starts as a service, you can collect thread dumps by doing one of the following:

Submit the Information to Oracle JRockit Support

Open a case with Oracle Support, who will continue to troubleshoot your JVM freeze until it is resolved. Be sure to include any information pertinent to the freeze, including the all thread dumps you’ve collected. For information on communication with Oracle Support, please refer to Submitting Problems to Oracle Support.

 


Non-responding NFS Shares

Note: This information is for Linux users, only

In some cases, the freeze might be caused by a problem with the Network File System (NFS). NFS is a protocol used by Linux computers to share disks across a network. An NFS share is any disk on NFS set up to be shared by other computers. If you are using a machine that has NFS shares (look for nfs in /etc/fstab), your application might be freezing because a Java application is trying to access data on a non-responding NFS share. When that happens, the default behavior for the thread doing the file access is not to respond to any signals until the NFS server comes back up. This means that the Oracle JRockit JVM cannot suspend the thread, and it might freeze trying to suspend a thread until NFS services are restored.

Verify that your NFS server is configured correctly if you're having NFS problems.


  Back to Top       Previous  Next