Hitachi

uCosminexus Application Server Definition Reference Guide


-XX:[+|-]HitachiOutOfMemoryStackTrace (Option for stack trace output)

Organization of this page

Format

-XX:+HitachiOutOfMemoryStackTrace

When OutOfMemoryError occurs, this option outputs the exception information and the stack trace in the JavaVM log file.

The stack trace is stored in the buffer for each stack and is output after changing the code. The stack trace is output every time OutOfMemoryError is thrown. Therefore, when OutOfMemoryError is caught and thrown again, the stack trace is output multiple times. When OutOfMemoryError occurs during the creation of the thread, the stack trace is not output.

-XX:-HitachiOutOfMemoryStackTrace

When OutOfMemoryError occurs, this option does not output the stack trace to the JavaVM log file.

Description

Specify whether to output the exception information and the stack trace to the JavaVM log file when OutOfMemoryError occurs.

Default value
  • -XX:-HitachiOutOfMemoryStackTrace

Output format

[id] [Thread:thread_id]date[java.lang.OutOfMemoryError : requested size bytes (cause) : reason : thread_count threads exist]
[id] [Thread:thread_id] stack_trace

The following is a description of the output contents:

id

OOM (Identifier of the JavaVM log file).

thread_id

Thread ID (tid output to the thread dump).

date

Indicates the date and time when OutOfMemory exception occurs.

size

The size of the memory that you tried to secure is output (unit: Bytes). When the -XX:-HitachiOutOfMemorySize option is specified, the size is not output.

Note that in the following cases the requested memory size is not fetched. In such cases, "unknown" is output as the size.

  • When OutOfMemoryError is explicitly thrown without using the memory secure functionality of Java

    The errors thrown by the standard class library will also be included. For example, when an error is thrown by the processes, such as "throw new OutOfMemoryError();" the memory size cannot be output.

  • When OutOfMemoryError is caused by the verifier in the case of class loading.

cause

Indicates the types of causes for the occurrence of exceptions. The cause, however, is not output when the -XX:-HitachiOutOfMemoryCause option is specified. For the types of causes for the occurrence of exceptions, see -XX:[+|-]HitachiOutOfMemoryCause (Option to output the causes of exception).

reason

Indicates the reason for the occurrence of the exception. The reason is output when the creation of the thread fails.

thread_count

Indicates the number of threads when OutOfMemoryError occurs. The count also includes the number of threads whose creation failed.

stack_trace

Stack trace.

Examples of output

[OOM][Thread: 0x00062fd0] <Wed Mar 17 00:41:17 2004>[java.lang.OutOfMemoryError :requested 400000 bytes.(C Heap): unable to create thread : 1500 threads exist]
[OOM][Thread: 0x00062fd0] at java.lang.Thread.start(Native Method)
[OOM][Thread: 0x00062fd0] at sub1.<init>(Thread0012.java:22)
[OOM][Thread: 0x00062fd0] at Thread0012.test01(Thread0012.java:73)
[OOM][Thread: 0x00062fd0] at Thread0012.main(Thread0012.java:57)

Precautions