JVM crash in DumperSupport::dump_field_value when using G1GC
Environment
- Java 1.7 update 79 and earlier
Issue
When we use jmap to take a heap dump, the target java process crashes. The fatal error log contains:
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x58c276] DumperSupport::dump_field_value(DumpWriter*, char, unsigned char*)+0x1c6
V [libjvm.so+0x58d22a] DumperSupport::dump_instance_fields(DumpWriter*, oopDesc*)+0x24a
V [libjvm.so+0x58de6b] DumperSupport::dump_instance(DumpWriter*, oopDesc*)+0xfb
V [libjvm.so+0x58f354] HeapObjectDumper::do_object(oopDesc*)+0x124
V [libjvm.so+0x8c917a] ContiguousSpace::object_iterate_from(WaterMark, ObjectClosure*)+0x7a
V [libjvm.so+0x52fe00] IterateObjectClosureRegionClosure::doHeapRegion(HeapRegion*)+0x20
V [libjvm.so+0x59b0a9] HeapRegionSeq::iterate(HeapRegionClosure*) const+0x49
V [libjvm.so+0x531fc9] G1CollectedHeap::safe_object_iterate(ObjectClosure*)+0x39
V [libjvm.so+0x590dac] VM_HeapDumper::doit()+0x29c
V [libjvm.so+0x99bd25] VM_Operation::evaluate()+0x55
V [libjvm.so+0x99a15a] VMThread::evaluate_operation(VM_Operation*)+0xba
V [libjvm.so+0x99a4de] VMThread::loop()+0x1ce
V [libjvm.so+0x99a950] VMThread::run()+0x70
V [libjvm.so+0x815668] java_start(Thread*)+0x108
Resolution
- Update to the latest Java 7 update
Root Cause
Category
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.