Error Occurred During Error Reporting Java
Contents |
Contents Previous Next 5.1 Determine Where the Crash Occurred This section provides a number of examples which demonstrate how the error log can be used to find the cause of the java error occurred during initialization of vm crash, and suggests some tips for troubleshooting the problem depending on the cause.
Java Error Occurred During Initialization Of Vm Java/lang/noclassdeffounderror Java/lang/object
The error log header indicates the type of error and the problematic frame, while the thread stack indicates the
Java Error Occurred During Initialization Of Vm Too Small Initial Heap
current thread and stack trace. See Header Format. The following are possible causes for the crash. Crash in Native Code Crash in Compiled Code Crash in HotSpot Compiler Thread Crash in
Tomcat Error Occurred During Initialization Of Vm Java Lang Noclassdeffounderror Java Lang Object
VM Thread Crash Due to Stack Overflow 5.1.1 Crash in Native Code If the fatal error log indicates the problematic frame to be a native library, there might be a bug in native code or the Java Native Interface (JNI) library code. The crash could of course be caused by something else, but analysis of the library and any core file or crash dump error occurred during error reporting (printing native stack) is a good starting place. Consider the extract in Example 5-1 from the header of a fatal error log. Example 5-1 Extract from the Header of a Fatal Error Log # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0x417789d7, pid=21139, tid=1024 # # Java VM: Java HotSpot(TM) Server VM (6-beta2-b63 mixed mode) # Problematic frame: # C [libApplication.so+0x9d7] In this case a SIGSEGV occurred with a thread executing in the library libApplication.so. In some cases a bug in a native library manifests itself as a crash in Java VM code. Consider the crash in Example 5-2, where a JavaThread fails while in the _thread_in_vm state (meaning that it is executing in Java VM code). Example 5-2 Example for a Crash # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x08083d77, pid=3700, tid=2896 # # Java VM: Java HotSpot(TM) Client VM (1.5-internal mixed mode) # Problematic frame: # V [jvm.dll+0x83d77] --------------- T H R E A D --------------- Current thread (0x00036960): JavaThread "main" [_thread_in_vm, id=2896] : Stack: [0x00040000,0x00080000), sp=0x0007f9f8, free space=254k Native frames: (J=compil
be down. Please try the request again. Your cache administrator is webmaster. Generated Fri, 14 Oct 2016 09:07:03 GMT by s_ac15 (squid/3.5.20)
Details Type: Bug Status: Resolved Priority: Major Resolution: Fixed Affects https://java.net/jira/browse/JNA-157 Version/s: 3.2.3 Fix Version/s: not determined Component/s: library Labels: None Environment: Operating System: Windows XP Platform: All Issuezilla Id: 157 Description If https://axtaxt.wordpress.com/2012/04/22/debugging-java-vms-jit-compiler/ the native library is unloaded by the Native finalizer, the JVM crashes when a Memory object later attempts to finalize itself. This error occurred happens inconsistently and rarely but needs to be fixed. (My understanding is that finalizers do not run in any guaranteed sequence.) # A fatal error has been detected by the Java Runtime Environment: # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x191435e0, pid=4124, tid=4796 # JRE version: error occurred during 6.0_16-b01 Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode windows-x86 ) Problematic frame: C 0x191435e0 # If you would like to submit a bug report, please visit: http://java.sun.com/webapps/bugreport/crash.jsp The crash happened outside the Java Virtual Machine in native code. See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x16d95000): JavaThread "Finalizer" daemon [_thread_in_native, id=4796, stack(0x16ec0000,0x16f10000)] siginfo: ExceptionCode=0xc0000005, reading address 0x191435e0 Registers: EAX=0x191435e0, EBX=0x14896498, ECX=0x16d95110, EDX=0x148b7b18 ESP=0x16f0f6bc, EBP=0x16f0f6f0, ESI=0x14896498, EDI=0x16d95000 EIP=0x191435e0, EFLAGS=0x00010283 Top of Stack: (sp=0x16f0f6bc) 0x16f0f6bc: 00b49e37 16d95110 16f0f6f8 00a2f8d8 0x16f0f6cc: 00000000 16f0f6d0 00000000 16f0f704 0x16f0f6dc: 148b7b18 00000000 14896498 00000000 0x16f0f6ec: 16f0f700 16f0f728 00b42da1 148968a8 0x16f0f6fc: 00b48269 00a2f8d8 00000000 16f0f708 0x16f0f70c: 1489462c 16f0f730 148b7b18 00000000 0x16f0f71c: 14894650 16f0f700 16f0f730 16f0f74c 0x16f0f72c: 00b402cb 046a57f0 16f0f75c 6d8ec844 Instructions: (pc=0
by axtaxt Recently I've run into some misterious Java VM crashes. After narrowing down the crashing code, I've ended up with this POC: package org.axt.cr; public class Crash { @SuppressWarnings("unused") private static int val; private static double arr[] = new double[2048]; public static void cr() { for(int i=0; i