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

[lworld] CorrectlyRestoreRfp.java triggers "bad oop found" during deoptimization

XMLWordPrintable

      compiler/valhalla/inlinetypes/CorrectlyRestoreRfp.java fails on AArch64 with "-XX:+UnlockDiagnosticVMOptions -XX:+SafepointALot -XX:+DeoptimizeALot -XX:+DeoptimizeNMethodBarriersALot -XX:MaxNodeLimit=100000"

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/workspace/open/src/hotspot/share/runtime/stackValue.cpp:129), pid=1002237, tid=1002300
      # assert(oopDesc::is_oop_or_null(val)) failed: bad oop found at 0x0000ffff88756080 in_cont: 0 compressed: 0
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-09-09-0157544.patricio.chilano.mateo.valhalla)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-09-09-0157544.patricio.chilano.mateo.valhalla, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0x1744f40] StackValue::create_stack_value_from_oop_location(stackChunkOop, void*)+0x500

      Stack: [0x0000ffff8855a000,0x0000ffff88758000], sp=0x0000ffff887546e0, free space=2025k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1744f40] StackValue::create_stack_value_from_oop_location(stackChunkOop, void*)+0x500 (stackValue.cpp:129)
      V [libjvm.so+0x174704c] StackValue* StackValue::create_stack_value<RegisterMap>(frame const*, RegisterMap const*, ScopeValue*)+0x32c (stackValue.cpp:200)
      V [libjvm.so+0x194d7b8] compiledVFrame::create_stack_value(ScopeValue*) const+0x108 (vframe_hp.cpp:225)
      V [libjvm.so+0x194fe40] compiledVFrame::locals() const+0x110 (vframe_hp.cpp:61)
      V [libjvm.so+0x1949adc] vframeArrayElement::fill_in(compiledVFrame*, bool)+0x13c (vframeArray.cpp:124)
      V [libjvm.so+0x194b494] vframeArray::fill_in(JavaThread*, int, GrowableArray<compiledVFrame*>*, RegisterMap const*, bool)+0x70 (vframeArray.cpp:530)
      V [libjvm.so+0x194b6a8] vframeArray::allocate(JavaThread*, int, GrowableArray<compiledVFrame*>*, RegisterMap*, frame, frame, frame, bool)+0xe8 (vframeArray.cpp:517)
      V [libjvm.so+0xaadf88] Deoptimization::create_vframeArray(JavaThread*, frame, RegisterMap*, GrowableArray<compiledVFrame*>*, bool)+0x128 (deoptimization.cpp:1821)
      V [libjvm.so+0xab1d8c] Deoptimization::fetch_unroll_info_helper(JavaThread*, int)+0x54c (deoptimization.cpp:598)
      V [libjvm.so+0xab2ec4] Deoptimization::fetch_unroll_info(JavaThread*, int)+0x60 (deoptimization.cpp:302)
      v ~DeoptimizationBlob 0x0000ffffa3d02508
      J 35 c1 compiler.valhalla.inlinetypes.CorrectlyRestoreRfp.compile_me_C1_testLargeValueWithOopsHelper(Ljava/lang/Object;)Lcompiler/valhalla/inlinetypes/CorrectlyRestoreRfp$LargeValueWithOops; (24 bytes) @ 0x0000ffffa41c5554 [0x0000ffffa41c5400+0x0000000000000154]
      j compiler.valhalla.inlinetypes.CorrectlyRestoreRfp.lambda$main$0(Ljava/util/concurrent/CountDownLatch;)V+18
      j compiler.valhalla.inlinetypes.CorrectlyRestoreRfp$$Lambda+0x00000ff801042940.run()V+4
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@25-lworld5ea
      j java.lang.Thread.run()V+19 java.base@25-lworld5ea
      v ~StubRoutines::call_stub 0x0000ffffa3c2f19c
      V [libjvm.so+0xe97b9c] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x47c (javaCalls.cpp:429)
      V [libjvm.so+0xe98400] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x278 (javaCalls.cpp:325)
      V [libjvm.so+0xe98994] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x8c (javaCalls.cpp:187)
      V [libjvm.so+0x10332a8] thread_entry(JavaThread*, JavaThread*)+0xc4 (jvm.cpp:2938)
      V [libjvm.so+0xed2528] JavaThread::thread_main_inner()+0x108 (javaThread.cpp:773)
      V [libjvm.so+0x187436c] Thread::call_run()+0xac (thread.cpp:243)
      V [libjvm.so+0x154839c] thread_native_entry(Thread*)+0x12c (os_linux.cpp:868)
      C [libc.so.6+0x80b50] start_thread+0x300
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      v ~DeoptimizationBlob 0x0000ffffa3d02508
      J 35 c1 compiler.valhalla.inlinetypes.CorrectlyRestoreRfp.compile_me_C1_testLargeValueWithOopsHelper(Ljava/lang/Object;)Lcompiler/valhalla/inlinetypes/CorrectlyRestoreRfp$LargeValueWithOops; (24 bytes) @ 0x0000ffffa41c5554 [0x0000ffffa41c5400+0x0000000000000154]
      j compiler.valhalla.inlinetypes.CorrectlyRestoreRfp.lambda$main$0(Ljava/util/concurrent/CountDownLatch;)V+18
      j compiler.valhalla.inlinetypes.CorrectlyRestoreRfp$$Lambda+0x00000ff801042940.run()V+4
      j java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@25-lworld5ea
      j java.lang.Thread.run()V+19 java.base@25-lworld5ea
      v ~StubRoutines::call_stub 0x0000ffffa3c2f19c

      Also triggers with TestVirtualThreads.java that [~pchilanomate] is adding with JDK-8336845.

            mchevalier Marc Chevalier
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: