I am studying a JVM crash that sometimes happens in my application. The hs_err file contains the following crash information.
# SIGSEGV (0xb) at pc=0x065e68f4, pid=20208, tid=570166160
...
# Problematic frame:
...
Current thread (0x099ea800): JavaThread "Thread-315" daemon [_thread_in_vm, id=25782, stack(0x21fa3000,0x21fc1000)]
...
vm_info: Java HotSpot(TM) Server VM (10.0-b23) for linux-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:20:15 by "java_re" with gcc 3.2.1-7a (J2SE release)
So this tells me that the JVM gets into segfault when running some Java code. The error log also contains information about the stack that crashed.
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x5e68f4] V [libjvm.so+0x1c054f] V [libjvm.so+0x1bfef2] V [libjvm.so+0x1bf57f] V [libjvm.so+0x592495] V [libjvm.so+0x365c4e] v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter J org.myapp.AppClass.getBytes()Lorg/myapp/ByteHolder;
I used GDB to connect to the main file due to a crash and getting more detailed stack information. This gives me the following result.
#5 <signal handler called>
This shows that the six libjvm.so frames listed in the original error report were associated with a Java lock capture. However, I cannot find the code inside org.myapp.AppClass.getBytes (), which uses any locks.
What do the BufferBlob :: Interpreter lines on the stack mean? Are these Java stack frames? JVM frame stack? Is it possible to work out what is called in these stack frames?
NOTE. Please do not suggest that I try to switch to the new JVM Hotspot. I rely on the CMS builder, and none of the later versions of the V1.6 Hotspot JVM is stable enough for the CMS collector.
EDIT: This document (http://www.oracle.com/technetwork/java/javase/tsg-vm-149989.pdf) states that frame "v" is "frame created by the virtual machine." Any idea what that means?
EDIT2: org.myapp.AppClass.getBytes () reads from a DataInputStream. This may include the following stack trace:
AppClass.getBytes() AppClass.readByte() DataInputStream.readByte() SocketInputStream.read() SocketInputStream.read(byte[],int,int) PlainSocketImpl.aquireFD()
This last method captures the lock. This may be the source of a possible call to the JVM code above. This stack above has a neat function that contains 5 frames of the Java stack below getBytes (). This will neatly match the 5 lines of BufferBlob :: Interpreter in the Java Frames list.
There are several new questions:
- Is it possible that the 5 lines of BufferBlob :: Interpreter in the Native Frames section are just duplicates of the same lines in the Java Frames section?
- Why doesn't the error log show data for these 5 frames of the stack?
EDIT3 - This Oracle error probably looks the same / similar error: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6676175
The stack trace shown is not identical, but mentions the state of the rare race in revoke_and_rebias, which was fixed at 6u14.
EDIT4 - The generosity message should say "familiar with the Hotspot implementation"