JVM crash in PSParallelCompact::IsAliveClosure::do_object_b
Environment
- OpenJDK
- Oracle JDK
Issue
JVM crashes with these native frames in hs_err_pid log file:
Stack: [0x00007fc990d6b000,0x00007fc990e6c000], sp=0x00007fc990e6a160, free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x979a86] PSParallelCompact::IsAliveClosure::do_object_b(oopDesc*)+0x36
V [libjvm.so+0x8b910c] MethodData::clean_extra_data(BoolObjectClosure*)+0x1dc
V [libjvm.so+0x63bbb2] InstanceKlass::clean_method_data(BoolObjectClosure*)+0x42
V [libjvm.so+0x7c6db9] Klass::clean_weak_klass_links(BoolObjectClosure*, bool)+0x199
V [libjvm.so+0x97b881] PSParallelCompact::marking_phase(ParCompactionManager*, bool, ParallelOldTracer*)+0x4e1
V [libjvm.so+0x9809ee] PSParallelCompact::invoke_no_policy(bool)+0x40e
V [libjvm.so+0x9868cd] PSScavenge::invoke()+0x1ad
V [libjvm.so+0x93e500] ParallelScavengeHeap::failed_mem_allocate(unsigned long)+0x70
V [libjvm.so+0xabb437] VM_ParallelGCFailedAllocation::doit()+0x97
V [libjvm.so+0xac2e65] VM_Operation::evaluate()+0x55
V [libjvm.so+0xac123a] VMThread::evaluate_operation(VM_Operation*)+0xba
V [libjvm.so+0xac15be] VMThread::loop()+0x1ce
V [libjvm.so+0xac1a30] VMThread::run()+0x70
V [libjvm.so+0x91cc68] java_start(Thread*)+0x108
VM_Operation (0x00007fc92e9f2d80): ParallelGCFailedAllocation, mode: safepoint, requested by thread 0x00007fc988006000
Resolution
- Update to the latest OpenJDK / Oracle JDK 1.8, or install a Oracle JDK with the backported fix.
- This may be related to AppDynamics javaagent so disable this if in use as a workaround. Try adding
-Dappdynamics.agent.disable.retransformation=true.
Root Cause
This is a known bug with OpenJDK / Oracle JDK:
Original bug report: <Content from bugs.openjdk.java.net is not included.https://bugs.openjdk.java.net/browse/JDK-8076110>
Backport to Java 1.8 Update 66: <Content from bugs.openjdk.java.net is not included.https://bugs.openjdk.java.net/browse/JDK-8098843>
Another backport to Java 1.8 Update 71: <Content from bugs.openjdk.java.net is not included.https://bugs.openjdk.java.net/browse/JDK-8133372>
Oracle JDK:
Content from bugs.java.com is not included.http://bugs.java.com/view_bug.do?bug_id=8169330
Content from bugs.java.com is not included.http://bugs.java.com/view_bug.do?bug_id=8170994
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.