uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

2.5.7 If JavaVM Terminates abnormally

The actions when JavaVM terminates abnormally and the information output in the case of abnormal termination are described below:

Organization of this subsection
(1) Actions in the case of abnormal termination
(2) Information output at the time of abnormal termination

(1) Actions in the case of abnormal termination

In UNIX, in the case of abnormal termination, perform actions in the following order. Further, these actions are not required in Windows.

  1. Execute the javatrace command on the machine where abnormal termination occurs.
    Output the javatrace.log file. For the execution method of the javatrace command, see 4.18 JavaVM stack trace information.
  2. Send the acquired javatrace.log file to maintenance personnel along with the error report file (hs_err_pidprocess-ID.log).
    For the method of acquiring the error report file, see 4.11 JavaVM Output Message Logs (Standard Output or Error Report File).
  3. Execute the following commands to create the archive file for the JavaVM executable file, the library loaded when the error occurred, and the core dump.
    • In AIX
      Execute the snapcore command. An archive file compressed with the pax command is created.
    • In HP-UX, Linux, and Solaris
      If the compress command is installed, execute the car_tar_Z command. An archive file compressed with the compress command is created.
      If the gzip command is installed, execute the car_tar_gz command. An archive file compressed with the gzip command is created.
  4. Send the created archive file to maintenance personnel.

(2) Information output at the time of abnormal termination

The information output when the following kind of abnormal termination occurs in JavaVM is described below:

(a) When C heap is insufficient during JavaVM processing

If C heap is insufficient, in continuation to the following messages, the memory status, Java heap information and stack trace information are output to the standard output and error report file (hs_err_pidprocess-ID.log). After that, JavaVM is forcefully terminated.

Check the output information and take an appropriate action.

Exception in thread thread-name java.lang.OutOfMemoryError:requested size-required-for-securing-memory bytes [for message-for-internal-investigation].
(b) When an OutOfMemoryError occurs due to a reason other than insufficient C heap during JavaVM processing

When setting -XX:+HitachiOutOfMemoryAbort as the option when starting the J2EE server, and when an OutOfMemoryError occurs due to the following causes, output the message and memory dump and perform forced termination of JavaVM. Check the output information and take an appropriate action.

However, the memory dump is not output in Windows Server 2012, Windows Server 2008, Windows 8, Windows 7, or Windows Vista. If the OutOfMemoryError occurs due to Java heap insufficiency or Perm heap insufficiency when the OutOfMemory handling functionality is already enabled (when -XX:+HitachiOutOfMemoryHandling is set), sometimes forceful termination is not performed.

Causes for forced termination
  • Java heap insufficiency
  • Perm heap insufficiency
  • Insufficient C heap in J2SE class library
Further, when C heap is insufficient in the JavaVM process, perform forced termination regardless of the specification of this option.
When terminating, output the following message and memory dump.
 
java.lang.OutOfMemoryError occurred.
JavaVM aborted because of specified -XX:+HitachiOutOfMemoryAbort options.

Forced termination timing
The timing when JavaVM is terminated forcefully differs depending on the option settings.
  • When -XX:+HitachiOutOfMemoryStackTrace is specified as the option, terminate after performing output of the stack trace. However, even when registering the process that is to be executed at JavaVM termination time by the java.io.File.deleteOnExit method and the java.lang.Runtime.addShutdownHook method beforehand, perform forced termination without executing these.
  • When setting -XX:+HitachiOutOfMemoryAbortThreadDump as the option, terminate after performing output of the thread dump. Especially for Java heap deficiency or Perm heap deficiency, and even if -XX:+HitachiOutOfMemoryAbortThreadDumpWithJHeapProf is set up as an option, terminate after the thread dump with the statistical information according to the class is output.

Operation when the OutOfMemory Handling functionality is enabled
If -XX:+HitachiOutOfMemoryHandling is set in addition to -XX:+HitachiOutOfMemoryAbort as an option when starting a J2EE server, the OutOfMemory handling functionality gets enabled. If Java heap or Perm heap insufficiency occurs after the OutOfMemory functionality is enabled, a process is executed to determine whether forceful termination should be performed by OutOfMemory handling. As a result of this judgment process, if all of the following OutOfMemoryError throw conditions are satisfied, forceful termination is not executed.

OutOfMemoryError Throw Conditions
  • OutOfMemory occurs due to Java heap insufficiency or Perm heap insufficiency.
  • OutOfMemory occurs in either the request processing in which the Web application (Servlet/JSP) on the Web container is running, the processing in which the Enterprise Bean invoked from an EJB client application is running, the processing in which a Message-driven Bean is running, or the processing in which the Enterprise Bean invoked from the TimerService is running.
  • Does not correspond to the OutOfMemoryError throw exclusion condition.
OutOfMemoryError Throw exclusion condition
If the total count (including the recent OutOf Memory errors) of the OutOfMemory errors that have occurred due to Java heap insufficiency and Perm heap insufficiency within 1 hour from the recent occurrence of the OutOfMemory error is more than the value specified in -XX:HitachiOutOfMemoryHandlingMaxThrowCount option.
For details, see -XX:[+|-]HitachiOutOfMemoryHandling (OutOfMemory handling options) in the uCosminexus Application Server Definition Reference Guide.
If the OutOfMemory handling functionality is enabled, whenever OutOfMemory occurs due to Java heap insufficiency or Perm heap insufficiency, the information related to the frequency of the OutOfMemory occurrence is output in the JavaVM log file.
(c) When an internal logical error occurred

When an internal logical error occurs, the message showing the JavaVM information where the error occurred, the examination error ID and the thread where the error occurred are output to the standard output and the error report file (hs_err_pidprocess-ID.log). Send the output information to maintenance personnel.