Java crashes in HeapDumper
Environment
- Oracle/Sun JDK
- 1.6
- 1.8.0_60, 1.8.0_144
- 1.8.0_181-b13
Issue
- On Oracle/Sun JDK 1.6 :
Our JVM crashed in libjvm's HeapDumper when creating a heap dump:
[1]
Stack: [0x00007fb3bc1c7000,0x00007fb3bc2c8000], sp=0x00007fb3bc2c6960, free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x496e2a] HeapObjectDumper::do_object(oopDesc*)+0x4a
V [libjvm.so+0x6e332f] MutableSpace::object_iterate(ObjectClosure*)+0x2f
V [libjvm.so+0x768101] PSYoungGen::object_iterate(ObjectClosure*)+0x21
V [libjvm.so+0x726cce] ParallelScavengeHeap::object_iterate(ObjectClosure*)+0x1e
V [libjvm.so+0x72768d] ParallelScavengeHeap::safe_object_iterate(ObjectClosure*)+0xd
V [libjvm.so+0x497c11] VM_HeapDumper::doit()+0x1d1
V [libjvm.so+0x870a2a] VM_Operation::evaluate()+0x4a
V [libjvm.so+0x86fff2] VMThread::evaluate_operation(VM_Operation*)+0x82
V [libjvm.so+0x870268] VMThread::loop()+0x198
V [libjvm.so+0x86fd6e] VMThread::run()+0x6e
V [libjvm.so+0x712eef] java_start(Thread*)+0x13f
- On Oracle/Sun JDK 1.8.0_144-b01 stacktrace as
[2]
Stack: [0x00007f02973f4000,0x00007f02974f5000], sp=0x00007f02974f3880, free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x6960db] java_lang_Class::signers(oopDesc*)+0x1b
V [libjvm.so+0x622c4a] DumperSupport::dump_class_and_array_classes(DumpWriter*, Klass*)+0xba
V [libjvm.so+0x46b856] ClassLoaderDataGraph::classes_do(void (*)(Klass*))+0x36
V [libjvm.so+0x624f29] VM_HeapDumper::doit()+0x239
V [libjvm.so+0xad4685] VM_Operation::evaluate()+0x55
V [libjvm.so+0xad2a5a] VMThread::evaluate_operation(VM_Operation*)+0xba
V [libjvm.so+0xad2dde] VMThread::loop()+0x1ce
V [libjvm.so+0xad3250] VMThread::run()+0x70
V [libjvm.so+0x92a338] java_start(Thread*)+0x108
VM_Operation (0x00007f0162a74460): HeapDumper, mode: safepoint, requested by thread 0x00007f01fcd5a000
Resolution
Disclaimer: Note that the link provided above points to a web site not owned or controlled by Red Hat. Use information present here at your own discretion.
Engage Oracle for further information on a fix. It doesn't appear to be fixed on 1.6 so an upgrade to the latest OracleJDK 1.7 update may be required.
Another alternative is to reproduce on the OpenJDK if possible and engage Red Hat.
Root Cause
-
First stack trace above mentioned in Issue paragraph[1] is Oracle JDK6 bug
- Content from bugs.java.com is not included.JDK-7110428 : Crash during HeapDump operation
- Fixed version : 6u85, 7u2, 8
-
Second stack trace in Issue paragraph[2] is Oracle JDK8 unresolved issue :
- Content from bugs.openjdk.java.net is not included.JDK-8080741 JVM crashes sporadically with SIGSEGV
- This issue has not been fixed because it is lack of information to analyze root cause.
- Provide
hs_err*andcorefile for further troubleshooting.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.