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

trace_method_handle_stub fails to find calling frame on x86

    XMLWordPrintable

Details

    • b20
    • x86_64
    • linux, os_x_10.15

    Description

      The following test failed in the JDK17 CI:

      runtime/logging/RedefineClasses.java

      Here's a snippet from the log file:

      #section:main
      ----------messages:(5/423)----------
      command: main -Xmx256m -XX:MaxMetaspaceSize=64m -javaagent:redefineagent.jar -Xlog:all=trace:file=all.log RedefineClasses
      reason: User specified action: run main/othervm -Xmx256m -XX:MaxMetaspaceSize=64m -javaagent:redefineagent.jar -Xlog:all=trace:file=all.log RedefineClasses
      Mode: othervm [/othervm specified]
      Additional options from @modules: --add-modules java.compiler,java.instrument
      elapsed time (seconds): 27.289
      ----------configuration:(3/57)----------
      Boot Layer
        add modules: java.compiler java.instrument

      ----------System.out:(43/3436)----------
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/frame_x86.cpp:367
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/3c846bae-ce30-4a97-93ee-9fef4497ccb6-S79625/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e121a4ac-ae69-4112-87ab-ba829ed21fad/runs/1fcfdcdf-3388-4156-95ab-90890ea2845c/workspace/open/src/hotspot/cpu/x86/frame_x86.cpp:367), pid=30027, tid=30406
      # assert(nm->insts_contains_inclusive(original_pc)) failed: original PC must be in the main code section of the the compiled method (or must be immediately following it)
      #
      # JRE version: Java(TM) SE Runtime Environment (17.0+18) (fastdebug build 17-ea+18-LTS-1447)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-ea+18-LTS-1447, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xbe5525] frame::verify_deopt_original_pc(CompiledMethod*, long*)+0xa5
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/3c846bae-ce30-4a97-93ee-9fef4497ccb6-S79374/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/b12a4e35-a572-4134-a1dd-ea36c600fe98/runs/879dc36a-7752-4beb-af4e-34313f3030e2/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/scratch/4/core.30027)
      #
      # An error report file with more information is saved as:
      # /opt/mach5/mesos/work_dir/slaves/3c846bae-ce30-4a97-93ee-9fef4497ccb6-S79374/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/b12a4e35-a572-4134-a1dd-ea36c600fe98/runs/879dc36a-7752-4beb-af4e-34313f3030e2/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/scratch/4/hs_err_pid30027.log
      Compiled method (c2) 21335 3113 java.lang.invoke.MethodHandles::argumentsWithCombiner (130 bytes)
       total in heap [0x00007ff121a4e710,0x00007ff121a4fca8] = 5528
       relocation [0x00007ff121a4e888,0x00007ff121a4ea48] = 448
       main code [0x00007ff121a4ea60,0x00007ff121a4f1e0] = 1920
       stub code [0x00007ff121a4f1e0,0x00007ff121a4f250] = 112
       metadata [0x00007ff121a4f250,0x00007ff121a4f2c8] = 120
       scopes data [0x00007ff121a4f2c8,0x00007ff121a4f610] = 840
       scopes pcs [0x00007ff121a4f610,0x00007ff121a4fb40] = 1328
       dependencies [0x00007ff121a4fb40,0x00007ff121a4fb70] = 48
       handler table [0x00007ff121a4fb70,0x00007ff121a4fc60] = 240
       nul chk table [0x00007ff121a4fc60,0x00007ff121a4fca8] = 72
      Compiled method (c2) 21335 3113 java.lang.invoke.MethodHandles::argumentsWithCombiner (130 bytes)
       total in heap [0x00007ff121a4e710,0x00007ff121a4fca8] = 5528
       relocation [0x00007ff121a4e888,0x00007ff121a4ea48] = 448
       main code [0x00007ff121a4ea60,0x00007ff121a4f1e0] = 1920
       stub code [0x00007ff121a4f1e0,0x00007ff121a4f250] = 112
       metadata [0x00007ff121a4f250,0x00007ff121a4f2c8] = 120
       scopes data [0x00007ff121a4f2c8,0x00007ff121a4f610] = 840
       scopes pcs [0x00007ff121a4f610,0x00007ff121a4fb40] = 1328
       dependencies [0x00007ff121a4fb40,0x00007ff121a4fb70] = 48
       handler table [0x00007ff121a4fb70,0x00007ff121a4fc60] = 240
       nul chk table [0x00007ff121a4fc60,0x00007ff121a4fca8] = 72
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      ----------System.err:(0/0)----------
      ----------rerun:(50/7513)*----------

      Here's the crashing thread's stack:

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

      Current thread (0x00007ff12c3117a0): JavaThread "MainThread" [_thread_in_Java, id=30406, stack(0x00007ff1106f6000,0x00007ff1107f7000)]

      Stack: [0x00007ff1106f6000,0x00007ff1107f7000], sp=0x00007ff1107f3d70, free space=1015k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xbe5525] frame::verify_deopt_original_pc(CompiledMethod*, long*)+0xa5
      V [libjvm.so+0x1479862] trace_method_handle_stub(char const*, oopDesc*, long*, long*)+0x422
      v ~BufferBlob::MethodHandles adapters
      j java.lang.invoke.BoundMethodHandle$Species_LL.copyWithExtendL(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle;+18 java.base@17-ea
      J 3113 c2 java.lang.invoke.MethodHandles.argumentsWithCombiner(ZLjava/lang/invoke/MethodHandle;ILjava/lang/invoke/MethodHandle;[I)Ljava/lang/invoke/MethodHandle; java.base@17-ea (130 bytes) @ 0x00007ff121a4ec80 [0x00007ff121a4ea60+0x0000000000000220]
      J 3112 c2 java.lang.invoke.MethodHandles.filterArgumentsWithCombiner(Ljava/lang/invoke/MethodHandle;ILjava/lang/invoke/MethodHandle;[I)Ljava/lang/invoke/MethodHandle; java.base@17-ea (9 bytes) @ 0x00007ff1219188f8 [0x00007ff1219188c0+0x0000000000000038]
      j java.lang.invoke.StringConcatFactory.generateMHInlineCopy(Ljava/lang/invoke/MethodType;Ljava/util/List;)Ljava/lang/invoke/MethodHandle;+387 java.base@17-ea
      j java.lang.invoke.StringConcatFactory.makeConcatWithConstants(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;+220 java.base@17-ea
      J 3003 c2 java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@17-ea (22 bytes) @ 0x00007ff121e31d78 [0x00007ff121e31ce0+0x0000000000000098]
      J 3023 c2 java.lang.invoke.DelegatingMethodHandle$Holder.delegate(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@17-ea (25 bytes) @ 0x00007ff121e36f6c [0x00007ff121e36ee0+0x000000000000008c]
      J 3026 c2 java.lang.invoke.Invokers$Holder.invokeExact_MT(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; java.base@17-ea (30 bytes) @ 0x00007ff121e366fc [0x00007ff121e365c0+0x000000000000013c]
      j java.lang.invoke.BootstrapMethodInvoker.invoke(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+157 java.base@17-ea
      J 1581 c2 java.lang.invoke.CallSite.makeSite(Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/invoke/CallSite; java.base@17-ea (91 bytes) @ 0x00007ff121bf8c0c [0x00007ff121bf8bc0+0x000000000000004c]
      J 1580 c2 java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName; java.base@17-ea (44 bytes) @ 0x00007ff121bf5c20 [0x00007ff121bf5be0+0x0000000000000040]
      J 1579 c2 java.lang.invoke.MethodHandleNatives.linkCallSite(Ljava/lang/Object;ILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName; java.base@17-ea (66 bytes) @ 0x00007ff121bf70f8 [0x00007ff121bf7020+0x00000000000000d8]
      v ~StubRoutines::call_stub
      V [libjvm.so+0xe73325] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x595
      V [libjvm.so+0xe74492] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x312
      V [libjvm.so+0x1806e4e] SystemDictionary::invoke_bootstrap_method(BootstrapInfo&, Thread*)+0x31e
      V [libjvm.so+0x127b0c5] LinkResolver::resolve_dynamic_call(CallInfo&, BootstrapInfo&, Thread*)+0x25
      V [libjvm.so+0x127b626] LinkResolver::resolve_invokedynamic(CallInfo&, constantPoolHandle const&, int, Thread*)+0x136
      V [libjvm.so+0xe62a33] InterpreterRuntime::resolve_invokedynamic(JavaThread*)+0x1b3
      V [libjvm.so+0xe64798] InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x1f8
      j jdk.test.lib.compiler.InMemoryJavaCompiler$MemoryJavaFileObject.<init>(Ljava/lang/String;Ljava/lang/CharSequence;)V+15
      j jdk.test.lib.compiler.InMemoryJavaCompiler.compile(Ljava/lang/String;Ljava/lang/CharSequence;[Ljava/lang/String;)[B+6
      j RedefineClassHelper.redefineClass(Ljava/lang/Class;Ljava/lang/String;)V+9
      j RedefineClasses.main([Ljava/lang/String;)V+5
      v ~StubRoutines::call_stub
      V [libjvm.so+0xe73325] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x595
      V [libjvm.so+0x165eefb] invoke(InstanceKlass*, methodHandle const&, Handle, bool, objArrayHandle, BasicType, objArrayHandle, bool, Thread*) [clone .constprop.0]+0xf3b
      V [libjvm.so+0x165ffd0] Reflection::invoke_method(oop, Handle, objArrayHandle, Thread*)+0x200
      V [libjvm.so+0xff89c6] JVM_InvokeMethod+0x196
      J 684 jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@17-ea (0 bytes) @ 0x00007ff1219a223e [0x00007ff1219a20e0+0x000000000000015e]
      J 682 c2 jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@17-ea (150 bytes) @ 0x00007ff1219a2a58 [0x00007ff1219a2940+0x0000000000000118]
      J 681 c2 jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@17-ea (10 bytes) @ 0x00007ff12199fbb4 [0x00007ff12199fb40+0x0000000000000074]
      J 652 c2 java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@17-ea (65 bytes) @ 0x00007ff121994e7c [0x00007ff121994e00+0x000000000000007c]
      j com.sun.javatest.regtest.agent.MainWrapper$MainThread.run()V+172
      J 2847 c2 java.lang.Thread.run()V java.base@17-ea (17 bytes) @ 0x00007ff121df6830 [0x00007ff121df67c0+0x0000000000000070]
      v ~StubRoutines::call_stub
      V [libjvm.so+0xe73325] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x595
      V [libjvm.so+0xe73b85] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x4c5
      V [libjvm.so+0xe74007] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Thread*)+0x77
      V [libjvm.so+0xfe4d5b] thread_entry(JavaThread*, Thread*)+0x12b
      V [libjvm.so+0x1865cd1] JavaThread::thread_main_inner()+0x271
      V [libjvm.so+0x186de10] Thread::call_run()+0x100
      V [libjvm.so+0x1559576] thread_native_entry(Thread*)+0x116

      Attachments

        Issue Links

          Activity

            People

              vlivanov Vladimir Ivanov
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: