The process section is printed after the thread section. It contains information about the whole process, including thread list and memory usage of the process.
The thread list includes the threads that the VM is aware of, as shown in Example A-12. This includes all Java threads and some VM internal threads, but does not include any native threads created by the user application that have not attached to the VM a shown in Example A-13.
Example A-12 First Line from Thread List Format
=>0x0805ac88 JavaThread "main" [_thread_in_native, id=21139] | | | | | +----- ID | | | | +------------------- state | | | | (JavaThread only) | | | +--------------------------------- name | | +------------------------------------------ type | +---------------------------------------------------- pointer +------------------------------------------------------ "=>" current thread
Example A-13 VM Internal Threads in the Error Log
Java Threads: ( => current thread ) 0x080c8da0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=21147] 0x080c7988 JavaThread "CompilerThread0" daemon [_thread_blocked, id=21146] 0x080c6a48 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=21145] 0x080bb5f8 JavaThread "Finalizer" daemon [_thread_blocked, id=21144] 0x080ba940 JavaThread "Reference Handler" daemon [_thread_blocked, id=21143] =>0x0805ac88 JavaThread "main" [_thread_in_native, id=21139] Other Threads: 0x080b6070 VMThread [id=21142] 0x080ca088 WatcherThread [id=21148]
The thread type and thread state are described in Thread Section Format.
The next information is the VM state, which indicates the overall state of the virtual machine. Table A-3 describes the general states.
Table A-3 VM States
General VM State | Description |
---|---|
|
Normal execution. |
|
All threads are blocked in the VM waiting for a special VM operation to complete. |
|
A special VM operation is required and the VM is waiting for all threads in the VM to block. |
The VM state output is a single line in the error log, as follows:
VM state:not at safepoint (normal execution)
The next information in the error log is a list of mutexes and monitors that are currently owned by a thread, as shown in Example A-14. These mutexes are VM internal locks rather than monitors associated with Java objects. Below is an example to show how the output might look when a crash happens when VM locks are held. For each lock the log contains the name of the lock, its owner, and the addresses of a VM internal mutex structure and its OS lock. In general this information is useful only to those who are very familiar with the HotSpot VM. The owner thread can be cross-referenced to the thread list.
The next information is a summary of the heap, as shown in Example A-15. The output depends on the garbage collection (GC) configuration. In this example the serial collector is used, class data sharing is disabled, and the tenured generation is empty. This probably indicates that the fatal error occurred early or during start-up and a GC has not yet promoted any objects into the tenured generation.
Example A-15 Heap Summary in the Error Log
Heap def new generation total 576K, used 161K [0x46570000, 0x46610000, 0x46a50000) eden space 512K, 31% used [0x46570000, 0x46598768, 0x465f0000) from space 64K, 0% used [0x465f0000, 0x465f0000, 0x46600000) to space 64K, 0% used [0x46600000, 0x46600000, 0x46610000) tenured generation total 1408K, used 0K [0x46a50000, 0x46bb0000, 0x4a570000) the space 1408K, 0% used [0x46a50000, 0x46a50000, 0x46a50200, 0x46bb0000) compacting perm gen total 8192K, used 1319K [0x4a570000, 0x4ad70000, 0x4e570000) the space 8192K, 16% used [0x4a570000, 0x4a6b9d48, 0x4a6b9e00, 0x4ad70000) No shared spaces configured.
The next information in the log is a list of virtual memory regions at the time of the crash. This list can be long in the case of large applications. The memory map can be very useful when debugging some crashes, as it can tell you what libraries are actually being used, their location in memory, as well as the location of heap, stack, and guard pages.
The format of the memory map is operating-system-specific. On the Oracle Solaris operating system, the base address and library name are printed. On the Linux system the process memory map (/proc/pid/maps) is printed. On the Windows system, the base and end addresses of each library are printed. Example A-16 shows the output generated on Linux/x86. Note: Most of the lines have been omitted from the example for the sake of brevity.
Example A-16 List of Virtual Memory Regions in the Error Log
Dynamic libraries: 08048000-08056000 r-xp 00000000 03:05 259171 /h/jdk6/bin/java 08056000-08058000 rw-p 0000d000 03:05 259171 /h/jdk6/bin/java 08058000-0818e000 rwxp 00000000 00:00 0 40000000-40013000 r-xp 00000000 03:0a 400046 /lib/ld-2.2.5.so 40013000-40014000 rw-p 00013000 03:0a 400046 /lib/ld-2.2.5.so 40014000-40015000 r--p 00000000 00:00 0 Lines omitted. 4123d000-4125a000 rwxp 00001000 00:00 0 4125a000-4125f000 rwxp 00000000 00:00 0 4125f000-4127b000 rwxp 00023000 00:00 0 4127b000-4127e000 ---p 00003000 00:00 0 4127e000-412fb000 rwxp 00006000 00:00 0 412fb000-412fe000 ---p 00083000 00:00 0 412fe000-4137b000 rwxp 00086000 00:00 0 Lines omitted. 44600000-46570000 rwxp 00090000 00:00 0 46570000-46610000 rwxp 00000000 00:00 0 46610000-46a50000 rwxp 020a0000 00:00 0 46a50000-46bb0000 rwxp 00000000 00:00 0 46bb0000-4a570000 rwxp 02640000 00:00 0 Lines omitted.
Example A-17 Format of Memory Map in the Error Log
40049000-4035c000 r-xp 00000000 03:05 824473 /jdk1.5/jre/lib/i386/client/libjvm.so |<------------->| ^ ^ ^ ^ |<--------------------------------->| Memory region | | | | | | | | | | Permission --- + | | | | r: read | | | | w: write | | | | x: execute | | | | p: private | | | | s: share | | | | | | | | File offset ----------+ | | | | | | Major ID and minor ID of -------+ | | the device where the file | | is located (i.e. /dev/hda5) | | | | inode number ------------------------+ | | File name --------------------------------------------------+
Example A-17 shows the memory map output, each library has two virtual memory regions: one for code and one for data. The permission for the code segment is marked with r-xp
(readable, executable, private), and the permission for the data segment is rw-p
(readable, writable, private).
The Java heap is already included in the heap summary earlier in the output, but it can be useful to verify that the actual memory regions reserved for heap match the values in the heap summary and that the attributes are set to rwxp
.
Thread stacks usually show up in the memory map as two back-to-back regions, one with permission ---p
(guard page) and one with permission rwxp
(actual stack space). In addition, it is useful to know the guard page size or stack size. For example, in this memory map, the stack is located from 4127b000 to 412fb000.
On a Windows system, the memory map output is the load and end address of each loaded module, as shown in Example A-18.
Example A-18 Memory Map on Windows
Dynamic libraries: 0x00400000 - 0x0040c000 c:\jdk6\bin\java.exe 0x77f50000 - 0x77ff7000 C:\WINDOWS\System32\ntdll.dll 0x77e60000 - 0x77f46000 C:\WINDOWS\system32\kernel32.dll 0x77dd0000 - 0x77e5d000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll 0x77c10000 - 0x77c63000 C:\WINDOWS\system32\MSVCRT.dll 0x08000000 - 0x08183000 c:\jdk6\jre\bin\client\jvm.dll 0x77d40000 - 0x77dcc000 C:\WINDOWS\system32\USER32.dll 0x7e090000 - 0x7e0d1000 C:\WINDOWS\system32\GDI32.dll 0x76b40000 - 0x76b6c000 C:\WINDOWS\System32\WINMM.dll 0x6d2f0000 - 0x6d2f8000 c:\jdk6\jre\bin\hpi.dll 0x76bf0000 - 0x76bfb000 C:\WINDOWS\System32\PSAPI.DLL 0x6d680000 - 0x6d68c000 c:\jdk6\jre\bin\verify.dll 0x6d370000 - 0x6d38d000 c:\jdk6\jre\bin\java.dll 0x6d6a0000 - 0x6d6af000 c:\jdk6\jre\bin\zip.dll 0x10000000 - 0x10032000 C:\bugs\crash2\App.dll
The next information in the error log is a list of VM arguments, followed by a list of environment variables, as shown in Example A-19.
Example A-19 List of VM Arguments and Environment Variables
VM Arguments: java_command: NativeSEGV 2 Environment Variables: JAVA_HOME=/h/jdk PATH=/h/jdk/bin:.:/h/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin: /usr/dist/local/exe:/usr/dist/exe:/bin:/usr/sbin:/usr/ccs/bin: /usr/ucb:/usr/bsd:/usr/etc:/etc:/usr/dt/bin:/usr/openwin/bin: /usr/sbin:/sbin:/h:/net/prt-web/prt/bin USERNAME=user LD_LIBRARY_PATH=/h/jdk6/jre/lib/i386/client:/h/jdk6/jre/lib/i386: /h/jdk6/jre/../lib/i386:/h/bugs/NativeSEGV SHELL=/bin/tcsh DISPLAY=:0.0 HOSTTYPE=i386-linux OSTYPE=linux ARCH=Linux MACHTYPE=i386
Note: The list of environment variables is not the full list but rather a subset of the environment variables that are applicable to the Java VM. |
On Oracle Solaris and Linux operating systems, the next information in the error log is the list of signal handlers, as shown in Example A-20.
Example A-20 List of Signal Handlers in the Error Log
Signal Handlers: SIGSEGV: [libjvm.so+0x3aea90], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x3aea90], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x304e70], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x306e80], sa_mask[0]=0x80000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGINT: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGTERM: [libjvm.so+0x3068a0], sa_mask[0]=0xfffbfeff, sa_flags=0x10000004 SIGUSR2: [libjvm.so+0x306e80], sa_mask[0]=0x80000000, sa_flags=0x10000004