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

[lworld] Several crashes when running test TestVirtualThreads.java with -XX:+SafepointALot -XX:+DeoptimizeALot -XX:+DeoptimizeNMethodBarriersALot -XX:MaxNodeLimit=100000

XMLWordPrintable

      While working on JDK-8336845, I encountered several crashes when running test TestVirtualThreads.java with the valhalla-comp-stress job in mach5. The crashes happen in the task that runs with flags: -XX:+UnlockDiagnosticVMOptions -XX:+SafepointALot -XX:+DeoptimizeALot -XX:+DeoptimizeNMethodBarriersALot -XX:MaxNodeLimit=100000. However even after removing all changes from 8336845 and restricting the test to run with platform threads only, the crashes still occur. One of these crashes is already covered by JDK-8367151, but I found additional ones:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (open/src/hotspot/cpu/x86/frame_x86.cpp:464), pid=3353386, tid=3353418
      # assert(nm->insts_contains_inclusive(original_pc)) failed: original PC must be in the main code section of the compiled method (or must be immediately following it) original_pc: 0x00000000c2860708 unextended_sp: 0x00007f87b6eed670 name: nmethod
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-09-06-0523324.patricio.chilano.mateo.valhalla)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-09-06-0523324.patricio.chilano.mateo.valhalla, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xdeb559] frame::verify_deopt_original_pc(nmethod*, long*)+0xa9
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to testoutput/test-support/jtreg_open_test_hotspot_jtreg_compiler_valhalla_inlinetypes_TestVirtualThreads_java/scratch/0/core.3353386)
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #


      --------------- T H R E A D ---------------

      Current thread (0x00007f8794057c40): JavaThread "Thread-2" [_thread_in_vm, id=3353418, stack(0x00007f87b6def000,0x00007f87b6eef000) (1024K)]

      Stack: [0x00007f87b6def000,0x00007f87b6eef000], sp=0x00007f87b6eea0b8, free space=1004k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xdeb559] frame::verify_deopt_original_pc(nmethod*, long*)+0xa9 (frame_x86.cpp:464)
      V [libjvm.so+0x939a82] frame::sender_for_compiled_frame(RegisterMap*) const+0x342 (frame_x86.inline.hpp:117)
      V [libjvm.so+0xb88b85] vframeStreamCommon::next()+0xaa5 (frame_x86.inline.hpp:423)
      V [libjvm.so+0x10f3df2] java_lang_Throwable::fill_in_stack_trace(Handle, methodHandle const&, JavaThread*)+0x12a2 (javaClasses.cpp:2838)
      V [libjvm.so+0x10f4c48] java_lang_Throwable::fill_in_stack_trace(Handle, methodHandle const&)+0x88 (javaClasses.cpp:2904)
      V [libjvm.so+0x1280aab] JVM_FillInStackTrace+0xcb (jvm.cpp:664)
      C [libjava.so+0x14961] Java_java_lang_Throwable_fillInStackTrace+0x11 (Throwable.c:49)
      j java.lang.Throwable.fillInStackTrace(I)Ljava/lang/Throwable;+0 java.base@25-lworld5ea
      j java.lang.Throwable.fillInStackTrace()Ljava/lang/Throwable;+16 java.base@25-lworld5ea
      j java.lang.NullPointerException.fillInStackTrace()Ljava/lang/Throwable;+37 java.base@25-lworld5ea
      j java.lang.Throwable.<init>()V+24 java.base@25-lworld5ea
      j java.lang.Exception.<init>()V+1 java.base@25-lworld5ea
      j java.lang.RuntimeException.<init>()V+1 java.base@25-lworld5ea
      j java.lang.NullPointerException.<init>()V+1 java.base@25-lworld5ea
      v ~StubRoutines::call_stub 0x00007f87e7c53001
      V [libjvm.so+0x10c51c8] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x508 (javaCalls.cpp:429)
      V [libjvm.so+0x10c6e8f] JavaCalls::call_special(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x18f (javaCalls.cpp:325)
      V [libjvm.so+0x10c7716] JavaCalls::construct_new_instance(InstanceKlass*, Symbol*, JavaCallArguments*, JavaThread*)+0x116 (javaCalls.cpp:291)
      V [libjvm.so+0xd95d4b] Exceptions::new_exception(JavaThread*, Symbol*, Symbol*, JavaCallArguments*, Handle)+0x1db (exceptions.cpp:315)
      V [libjvm.so+0xd95f7f] Exceptions::new_exception(JavaThread*, Symbol*, Symbol*, JavaCallArguments*, Handle, Handle)+0x2f (exceptions.cpp:336)
      V [libjvm.so+0xd96e9f] Exceptions::new_exception(JavaThread*, Symbol*, char const*, Handle, Handle, Exceptions::ExceptionMsgToUtf8Mode)+0x3bf (exceptions.cpp:419)
      V [libjvm.so+0x19cab95] SharedRuntime::throw_NullPointerException_at_call(JavaThread*)+0x95 (sharedRuntime.cpp:690)
      v ~RuntimeStub::Shared Runtime throw_NullPointerException_at_call_blob 0x00007f87e7d76e16


            Unassigned Unassigned
            pchilanomate Patricio Chilano Mateo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: