Java crash in MinINode::Ideal(PhaseGVN*, bool)

Solution Verified - Updated

Environment

  • OpenJDK
    • 8
    • 11

Issue

  • Example 1: JVM crash in C2 CompilerThread:
Stack: [0x00007fdf78a12000,0x00007fdf78b13000],  sp=0x00007fdf78b0e110,  free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x2f01c4]  MinINode::Ideal(PhaseGVN*, bool)+0x4e4
V  [libjvm.so+0x99644e]  PhaseIterGVN::transform_old(Node*)+0x6e
V  [libjvm.so+0x9942cc]  PhaseIterGVN::optimize()+0x1ac
V  [libjvm.so+0x4b1562]  Compile::Optimize()+0xab2
V  [libjvm.so+0x4b326d]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool)+0x10cd
V  [libjvm.so+0x4088a0]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x1d0
V  [libjvm.so+0x4babb2]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x8d2
V  [libjvm.so+0x4bb880]  CompileBroker::compiler_thread_loop()+0x510
V  [libjvm.so+0xb032e2]  JavaThread::thread_main_inner()+0x212
V  [libjvm.so+0x93c7d2]  java_start(Thread*)+0xf2
C  [libpthread.so.0+0x7df5]  start_thread+0xc5


Current CompileTask:
C2:23591688 69216       4       com.example.MyHandler::handleSomething (1264 bytes)
  • Example 2: JVM crash in C2 CompilerThread:
Stack: [0x00007f9dda31c000,0x00007f9dda41c000],  sp=0x00007f9dda416c70,  free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x64a81e]  IfNode::Ideal(PhaseGVN*, bool)+0x112e
V  [libjvm.so+0x9bed3e]  PhaseIterGVN::transform_old(Node*)+0x6e
V  [libjvm.so+0x9bcd28]  PhaseIterGVN::optimize()+0xf8
V  [libjvm.so+0x860563]  PhaseIdealLoop::build_and_optimize(bool, bool)+0xa03
V  [libjvm.so+0x49eb91]  Compile::Optimize()+0x451
V  [libjvm.so+0x4a077b]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool)+0xdab
V  [libjvm.so+0x3f1656]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0xb6
V  [libjvm.so+0x4a9c05]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x895
V  [libjvm.so+0x4abfe8]  CompileBroker::compiler_thread_loop()+0x528
V  [libjvm.so+0xb4a4fc]  JavaThread::thread_main_inner()+0x20c
V  [libjvm.so+0xb4a869]  JavaThread::run()+0x309
V  [libjvm.so+0x96a402]  java_start(Thread*)+0x162
C  [libpthread.so.0+0x81ca]  start_thread+0xea


Current CompileTask:
C2:84882674 11136       4       java.lang.Class::getMethod0 (40 bytes)

Resolution

Upgrade to OpenJDK 8u275+ and 11.0.10+ to consume fix for Content from bugs.openjdk.java.net is not included.JDK-8250861.

Upgrade to OpenJDK 8u462+ or OpenJDK11+ to consume fix for Content from bugs.openjdk.org is not included.JDK-8071996.

Root Cause


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.