uCosminexus Application Server, Maintenance and Migration Guide

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

5.5 JavaVM Thread Dump

When you investigate the JavaVM thread dump, it is easy to investigate the cause of the error at the Java program level such as system dead locks.

The type of output information differs depending on the options specified when starting the J2EE server. For details on settings for acquiring the JavaVM material, see the subsection 3.3.19 Settings for Acquiring the JavaVM Material.

Organization of this section
(1) Structure of thread dump information
(2) Mapping between thread dump and trace based performance analysis file
(3) Output contents of Explicit heap details information

(1) Structure of thread dump information

The structure of JavaVM thread dump information is as follows:

Table 5-22 Structure of the thread dump information

Output information Contents
Header Date, JavaVM version information, start command line is output.
System settings Following information is output:
  • Java home path indicating the installation location of the JDK execution environment
  • Java DLL path indicating the installation directory of the library configuring JDK
  • System class path
  • Java command options
Operation environment Following information is output:
  • Host name
  • OS version
  • CPU information
  • Resource information (in UNIX)
Memory information (in Windows) Current memory usage size and various unused size information is output.
Java heap information Memory usage status of each generation of Java heap is output.
JavaVM internal memory map information Memory area information securing the JavaVM its self is output.
JavaVM internal memory size information Memory size information securing the JavaVM its self is output.
Application environment Following information is output:
  • Signal handler
  • Environment variable
Library information Loaded library information is output.
Thread information
<Thread 1>
...
<Thread n>
Thread information for each thread is output.
Java monitor dump# List of Java monitor objects is displayed.
JNI global reference information#2 Output the number of global references to JNI maintained by JavaVM.
Explicit heap detail information Output the following information for each class of Java process when you use the Explicit Heap Memory Management functionality:
  • Use status of entire Explicit heap
  • Use status for each Explicit memory block
When you execute the eheapprof command while using the Explicit Memory Management functionality, the statistical information of object within the Explicit memory block and the release rate information for the Explicit memory block is output.
Class-wise statistical information Output the following information for each class of Java process specified by the jheapprof command.
  • Total size and reference of instance as the member of an instance
  • Total size of instances possessed by static member
  • Total size of object classes and instances causing an increase in the Tenured area
Footer The time when thread dump terminated is displayed.

#
In UNIX, the notify pending list might not be displayed.

For details on the JavaVM thread dump information, see -XX:[+|-]HitachiThreadDump (extended thread dump information output option) in the uCosminexus Application Server Definition Reference Guide. For details on the class-wise statistical information, see 9.3 Class-wise statistical functionality. For details on the Explicit heap details information, see (3) Output contents of Explicit heap details information.

(2) Mapping between thread dump and trace based performance analysis file

Moreover, when slowdown or hang-up occurs in a J2EE application, you can investigate the locations where the errors occurred by correlating the thread dump with trace based performance analysis.

To correlate the thread dump with trace based performance analysis, use the thread ID output to the trace based performance analysis file with the nativeID (OS level thread ID) of the thread information output to the thread dump. To specify the corresponding trace based performance analysis file from the thread dump:

  1. Collect the thread dump and trace based performance analysis file.
    For details on the collection methods of thread dump, see 4.7 JavaVM thread dump. For details on the collection methods of the trace based performance analysis file, see 7.3.1 How to collect a trace based performance analysis file.
  2. Select the thread dump and trace based performance analysis file to be used.
    Based on the time when the thread dump and trace based performance analysis file are output, select the thread dump and trace based performance analysis file to be used for investigation. For details on the output time, see the following information:
    Thread dump
    Date and time output at the end of the file name and file.
    The following is an example showing the date and time output at the end of a file:
     ...
     ...
    Full thread dump completed. Fri Jul 21 19:22:47 2006
     
    Trace based performance analysis file
    Time and Time(msec/usec/nsec)
    The following figure shows the Time and Time (msec/usec/nsec) of the trace based performance analysis file.
    [Figure]
  3. Convert nid (hexadecimal) and jid (hexadecimal) of thread dump to decimal.
    • In Windows, AIX, HP-UX, and Solaris
      Convert the thread dump nid (hexadecimal) to decimal value.
       ...
       ...
      "VBJ ThreadPool Worker" daemon prio=5 jid=0x00054f93 tid=0x04cef380 nid=0x1124 in Object.wait() [0x0632f000..0x0632fd18]
       stack=[0x06330000..0x062f5000..0x062f1000..0x062f0000] 
       [user cpu time=0ms, kernel cpu time=15ms] [blocked count=1, waited count=29]
      at java.lang.Object.wait(Native Method)
       ...
       ...

      1124(Hexadecimal)=4388(Decimal)


    • In Linux
      Convert the thread dump nid (hexadecimal) to decimal value.
       ...
       ...
      "main" prio=1 jid=0x00006d75 tid=0x00201d70 nid=0x1e51 waiting on condition [0x00000000..0xbfe80488] stack=[0xbfe87000..0xbfc8c000..0xbfc88000..0xbfc87000] [user cpu time=1320ms, kernel cpu time=4280ms] [blocked count=5, waited count=4]
       ...
       ...

      6d75(Hexadecimal) = 28021 (Decimal)


  4. Search the row in which the value (Decimal) of Thread(hashcode) in the trace based performance analysis file matches with the value converted to decimal by procedure 3., and specify the trace information.
    • In Windows, AIX, HP-UX, and Solaris
      Search the line where value of Thread (Thread ID) is matching with the value converted to decimals.

      [Figure]

    • In Linux
      Search the line where value of hashcode (Hashcode) is matching with the value converted to decimals.

      [Figure]

(3) Output contents of Explicit heap details information

The Explicit heap information and the Explicit memory block information is output to the Explicit heap details information. When there is more than one Explicit memory block, they are output to the Explicit memory block information. You can also output the object statistical information within the Explicit memory blocks and the release rate information for the Explicit memory block to the Explicit memory block information.

The output format, output items, and output examples of Explicit heap details information are as follows:

Output format
The output format differs depending on the execution of eheapprof command.
  • When the eheapprof command is executed
    Explicit Heap Status
    --------------------
     max <EH_MAX>, total <EH_TOTAL>, used <EH_USED>, garbage <EH_GARB> (<EH_PER1> used/max, <EH_PER2> \
    used/total, <EH_PER3> garbage/used), <EM_NUMS> spaces exist
     
     Explicit Memories(<EM_MGR_PTR>)
    ...
     "<EM_NAME>" eid=<EID>(<EM_PTR>)/<EM_TYPE>, total <EM_TOTAL>, used <EM_USED>, garbage <EM_GARB> \
    (<EM_PER1> used/total, <EM_PER2> garbage/used, <FL_BLOCKS> blocks) <EM_STAT>
     deployed objects 
     ________________Size__Instances__FreeRatio__Class________________
       <ISIZE> <INUM> <FRATIO> <CNAME>
       ...
      <AISIZE> <AINUM> total
    ...
Note:
For details on the signs used in the output format, see 5.11.2(3) Signs used in description of output format of event log.
  • When the eheapprof command is not executed
    Explicit Heap Status
    --------------------
     max <EH_MAX>, total <EH_TOTAL>, used <EH_USED>, garbage <EH_GARB> (<EH_PER1> used/max, <EH_PER2> \
    used/total, <EH_PER3> garbage/used), <EM_NUMS> spaces exist
     
     Explicit Memories(<EM_MGR_PTR>)
    ...
     "<EM_NAME>" eid=<EID>(<EM_PTR>)/<EM_TYPE>, total <EM_TOTAL>, used <EM_USED>, garbage <EM_GARB> \
    (<EM_PER1> used/total, <EM_PER2> garbage/used, <FL_BLOCKS> blocks) <EM_STAT>
    ...
Note:
For details on the signs used in the output format, see 5.11.2(3) Signs used in description of output format of event log.

Output items
The following table describes about each item in output format.

Table 5-23 Output items (Explicit heap details information)

Category Output items Output contents Meaning
Explicit heap information <EH_MAX> <const>K Maximum size of Explicit heap is output. The unit is kilo bytes.
<EH_TOTAL> <const>K Secured Explicit heap size is output. The unit is kilo bytes.
<EH_USED> <const>K Used Explicit heap size is output. The unit is kilo bytes.
<EH_GARB> <const>K The internal status of Explicit heap is output.
<EH_PER1> <decimal>% Explicit heap utilization rate (<EH_USED>/<EH_MAX>) is output in % sign.
<EH_PER2> <decimal>% Explicit heap utilization rate (<EH_USED>/<EH_TOTAL>) is output in % sign.
<EH_PER3> <decimal>% The internal status of Explicit heap is output.
<EM_NUMS> <const> The valid Explicit memory blocks are output.
<EM_MGR_PTR> <ptr> Memory address that has internal information for Explicit heap control is output. The memory address can be used for investigating errors.
Explicit memory block information <EM_NAME> <letters> Name of Explicit memory block is output.
The output contents are uncertain when multi byte characters are included in name of Explicit memory block (Usually garbled and output).
At times "NULL" is output when name of Explicit memory block is output at about the same time of initialization of Explicit memory block or when JavaVM generates the Explicit memory block internally.
<EID> <const> ID of Explicit memory block is output.
<EM_PTR> <ptr> Memory address with Explicit memory block internal structure is output. The memory address can be used for investigating errors.
<EM_TYPE> R|B|A Explicit type is output. R indicates Explicit memory block used internally in Application Server. B indicates Explicit memory block used by application. A indicates the Explicit memory block that is specified using the automatic allocation configuration file.
<EM_TOTAL> <const>K Secured memory size of Explicit memory block is output. The unit is kilo bytes.
<EM_USED> <const>K Used size of Explicit memory block is output. The unit is kilo bytes.
<EM_GARB> <const>K Internal status of Explicit memory block is output. The unit is kilo bytes.
<EM_PER1> <decimal>% Explicit memory block utilization ratio (<EM_USED>/<EM_TOTAL>) is output in % sign.
<EM_PER2> <decimal>% Internal status of Explicit memory block is output.
<FL_BLOCKS> <const> Normally 0 is output
<EM_STAT> Enable|Disable Sub-status of Explicit memory block is output.
Object statistical information# <ISIZE> <const> Size in Explicit memory block of the object that sets the instance of a certain class is output.
<INUM> <const> Fixed quantity within the Explicit memory block of the object that sets the instance of certain class is displayed.
<CNAME> <letters> Entire class name of class indicating <ISIZE> and <INUM> is output.
<AISIZE> <const> Total size of all objects in Explicit memory block is output.
<AINUM> <const> Number of all blocks in Explicit memory block is output.
Object release rate information#2 <FRATIO> <decimal>% The ratio of the objects released (object release rate) in the automatic release processing of the Explicit memory block is output with the % (percentage) sign.
Object release rate =
(Number-of-class-objects-before-the-automatic-release-processing - Number-of-class-objects-after-the-automatic-release-processing)/Number-of-class-objects-before-the-automatic-release-processing [Figure]100
Note that when the object release rate information is output, "--" is output for the Explicit memory block that was not subject to the automatic release processing.

Note:
For details on the signs used in the output contents, see 5.11.2(3) Signs used in description of output format of event log.

#1
The object statistical information is output while executing the eheapprof command. You can output actually created size, "[I" indicating the int type array greater than the quantity, in the object statistical information. In such cases, "[I" indicates objects that are not used in an Explicit memory block. Create the int type array in internal process of JavaVM for objects that are not used in the Explicit memory block.

#2
The object release rate information is output when you execute the eheapprof command specifying the -freeratio option.

Example of output
The output format differs depending on execution of the eheapprof command.
  • When eheapprof command is executed
    Explicit Heap Status
    --------------------
     max 31415926K, total 162816K, used 150528K, garbage 10004K (0.0% used/max, 91.1% used/total, 6.6% garbage/used), 3 spaces exist
     
     Explicit Memories(0x12345678)
     
     "EJBMgrData" eid=1(0x02f25610)/R, total 54272K, used 50176K, garbage 0K (91.2% used/total, 0.0% garbage/used, 0 blocks) 
     deployed objects 
     ________________Size__Instances__FreeRatio__Class________________
      35234568 10648  - java.util.HashMap
       5678900 10668  - [Ljava.util.HashMap$Entry;
       4456788 7436  - java.util.HashMap$Entry
       4321000 200  - java.util.WeakHashMap
       1234568 190  - [Ljava.util.WeakHashMap$Entry;
       454400  4  - java.util.WeakHashMap$Entry
      51380224 29146 total
     
     "VJBStored" eid=3(0x02f25910)/B, total 54272K, used 50176K, garbage 10004K (90.7% used/total, 19.9% garbage/used, 5 blocks) 
     deployed objects 
     ________________Size__Instances__FreeRatio__Class________________
      35234568 10648  49 java.util.HashMap
       5678900 10668  43 [Ljava.util.HashMap$Entry;
       4456788 7436  50 java.util.HashMap$Entry
       4321000 200  32 java.util.WeakHashMap
       1234568 190  45 [Ljava.util.WeakHashMap$Entry;
       454400  4  22 java.util.WeakHashMap$Entry
      51380224 29146 total
     
     "ExplicitMemory-2" eid=2(0x02f25700)/B, total 54272K, used 50176K, garbage 0K (91.1% used/total, 0.0% garbage/used, 0 blocks) 
     deployed objects 
     ________________Size__Instances__FreeRatio__Class________________
      35234568 10648  - java.util.HashMap
       5678900 10668  - [Ljava.util.HashMap$Entry;
       4456788 7436  - java.util.HashMap$Entry
       4321000 200  - java.util.WeakHashMap
       1234568 190  - [Ljava.util.WeakHashMap$Entry;
       454400  4  - java.util.WeakHashMap$Entry
      51380224 29146 total
  • When the eheapprof command is not executed
    Explicit Heap Status
    --------------------
     max 31415926K, total 213971K, used 205369K, garbage 1234K (1.1% used/max, 96.2% used/total, 0.0% garbage/used), 3 spaces exist
     
     Explicit Memories(0x12345678)
     
     "EJBMgrData" eid=1(0x02f25610)/R, total 154272K, used 150176K, garbage 1234K (97.0% used/total, 1.2% garbage/used, 0 blocks) Enable
     
     "VJBStored" eid=3(0x02f25910)/B, total 54272K, used 50176K, garbage 0K (90.9% used/total, 0.0% garbage/used, 2 blocks) Enable
     
     "ExplicitMemory-2" eid=2(0x02f25700)/R, total 5427K, used 5017K, garbage 0K (92.1% used/total, 0.0% garbage/used, 0 blocks) Enable