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:
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:
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:
Here are two ways you can work around a Java application freeze.
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:
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:
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.
To collect information for an JRockit JVM running on Linux, use one of these procedures:
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
SIGABRT
aborts the signal sent to the process and causes a crash, thus producing a crash file. Invoke SIGABRT
as described here:
Note: | The following instructions are valid on 2.6 kernel-based Linux systems and on Red Hat Enterprise Linux 3.0. |
pstree -p webadmin | grep java
pstree
, try unsetting the LANG
environment variable first:unset LANG
pstree
gives you several processes, print the command line parameters for any process by entering:cat /proc/nnnn
/cmdline | xargs --null -n1 echo
(where nnnn
is the PID you are interested in; for example, 1234
)
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
).
ulimit -c unlimited
kill -SIGABRT
1234
To collect information for JRockit JVM running on Windows, use one of these procedures:
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
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"
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 |
If the JRockit JVM starts as a service, you can collect thread dumps by doing one of the following:
jrcmd
with the print_threads
Ctrl-Break handler. See Using jrcmd for background on jrcmd
and Available Diagnostic Commands for information on using print_threads
.beasvc – dump
to obtain thread-dumps from the JVM. For more information, please refer to
Setting Up a WebLogic Server Instance as a Windows Service.weblogic.Admin THREAD_DUMP
command. WL_HOME
\bin\beasvc -dump -svcname:service-name
where WL_HOME
is the directory in which you installed WebLogic Server and service-name
is the Windows service that is running a server instance; for example.:
D:\bea\weblogic81\server\bin\beasvc -dump -svcname:mydomain_myserver
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.
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.