Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8358568

C2 compilation hits "must have a monitor" assert with -XX:-GenerateSynchronizationCode

XMLWordPrintable

      java -XX:-TieredCompilation -Xcomp -XX:-GenerateSynchronizationCode -version

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (open/src/hotspot/share/opto/callnode.cpp:1489), pid=1808598, tid=1808616
      # assert(mon >= 0) failed: must have a monitor
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0+26) (fastdebug build 25-ea+26-LTS-3300)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+26-LTS-3300, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x965a72] SafePointNode::peek_monitor_obj() const+0xf2

      Current CompileTask:
      C2:62 2 !b java.lang.Class::desiredAssertionStatus (54 bytes)

      Stack: [0x0000741968300000,0x0000741968400000], sp=0x00007419683fc4b0, free space=1009k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x965a72] SafePointNode::peek_monitor_obj() const+0xf2 (callnode.cpp:1489)
      V [libjvm.so+0x14a3906] Parse::do_monitor_exit()+0x36
      V [libjvm.so+0x17bbe62] Parse::do_one_bytecode()+0x2be2
      V [libjvm.so+0x17a6a67] Parse::do_one_block()+0x357
      V [libjvm.so+0x17a7d60] Parse::do_all_blocks()+0x130
      V [libjvm.so+0x17ab243] Parse::Parse(JVMState*, ciMethod*, float)+0xaa3
      V [libjvm.so+0x95256b] ParseGenerator::generate(JVMState*)+0x13b
      V [libjvm.so+0xb283d8] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1828
      V [libjvm.so+0x94fe57] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x467
      V [libjvm.so+0xb37f18] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58
      V [libjvm.so+0xb390e8] CompileBroker::compiler_thread_loop()+0x578
      V [libjvm.so+0x108590b] JavaThread::thread_main_inner()+0x13b
      V [libjvm.so+0x1ad1746] Thread::call_run()+0xb6
      V [libjvm.so+0x1759058] thread_native_entry(Thread*)+0x128

            Unassigned Unassigned
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: