JDK-8280843 : macos-Aarch64 SEGV in frame::sender_for_compiled_frame after JDK-8277948
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: aarch64
  • Submitted: 2022-01-28
  • Updated: 2022-01-31
  • Resolved: 2022-01-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 masterFixed
Related Reports
Relates :  
Sub Tasks
JDK-8280898 :  
Description
Test: compiler/regalloc/TestC2IntPressure.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000109ebd418, pid=7520, tid=8451
#
# JRE version: Java(TM) SE Runtime Environment (19.0+8) (fastdebug build 19-ea+8-388)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-ea+8-388, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V  [libjvm.dylib+0x6bd418]  frame::sender_for_compiled_frame(RegisterMap*) const+0xa4
#
# Core dump will be written. Default location: core.7520
#
# 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 (0x0000000127809a10):  JavaThread "main" [_thread_in_vm, id=8451, stack(0x000000016af14000,0x000000016b117000)]

Stack: [0x000000016af14000,0x000000016b117000],  sp=0x000000016b114320,  free space=2048k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x6bd418]  frame::sender_for_compiled_frame(RegisterMap*) const+0xa4
V  [libjvm.dylib+0x6bc858]  frame::sender(RegisterMap*) const+0x18
V  [libjvm.dylib+0xec47dc]  SharedRuntime::resolve_sub_helper(bool, bool, JavaThread*)+0x78
V  [libjvm.dylib+0xec45fc]  SharedRuntime::resolve_helper(bool, bool, JavaThread*)+0x50
V  [libjvm.dylib+0xebd064]  SharedRuntime::resolve_opt_virtual_call_C(JavaThread*)+0x258
v  ~RuntimeStub::resolve_opt_virtual_call
J 8 c2 java.lang.String.charAt(I)C java.base (25 bytes) @ 0x0000000112b28960 [0x0000000112b28900+0x0000000000000060]
j  jdk.internal.org.objectweb.asm.ByteVector.putUTF8(Ljava/lang/String;)Ljdk/internal/org/objectweb/asm/ByteVector;+85 java.base
j  jdk.internal.org.objectweb.asm.SymbolTable.addConstantUtf8(Ljava/lang/String;)I+65 java.base
j  jdk.internal.org.objectweb.asm.MethodWriter.<init>(Ljdk/internal/org/objectweb/asm/SymbolTable;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;I)V+61 java.base
j  jdk.internal.org.objectweb.asm.ClassWriter.visitMethod(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Ljdk/internal/org/objectweb/asm/MethodVisitor;+19 java.base
j  java.lang.invoke.InvokerBytecodeGenerator.methodPrologue()V+22 java.base
j  java.lang.invoke.InvokerBytecodeGenerator.addMethod()V+1 java.base
j  java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCodeBytes()[B+6 java.base
j  java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCode(Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MemberName;+27 java.base
j  java.lang.invoke.LambdaForm.compileToBytecode()V+69 java.base
j  java.lang.invoke.Invokers.invokeHandleForm(Ljava/lang/invoke/MethodType;ZI)Ljava/lang/invoke/LambdaForm;+641 java.base
j  java.lang.invoke.Invokers.methodHandleInvokeLinkerMethod(Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+144 java.base
j  java.lang.invoke.MethodHandleNatives.linkMethodImpl(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+20 java.base
j  java.lang.invoke.MethodHandleNatives.linkMethod(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+14 java.base
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x8a0858]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4cc
V  [libjvm.dylib+0x89fe78]  JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0xf0
V  [libjvm.dylib+0xfd9dbc]  SystemDictionary::find_method_handle_invoker(Klass*, Symbol*, Symbol*, Klass*, Handle*, JavaThread*)+0x684
V  [libjvm.dylib+0xbd5e70]  LinkResolver::lookup_polymorphic_method(LinkInfo const&, Handle*, JavaThread*)+0x190
V  [libjvm.dylib+0xbdbc5c]  LinkResolver::resolve_handle_call(CallInfo&, LinkInfo const&, JavaThread*)+0xe8
V  [libjvm.dylib+0xbdb338]  LinkResolver::resolve_invokehandle(CallInfo&, constantPoolHandle const&, int, JavaThread*)+0x90
V  [libjvm.dylib+0x894de4]  InterpreterRuntime::resolve_invokehandle(JavaThread*)+0x208
V  [libjvm.dylib+0x89536c]  InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x274
j  jdk.internal.reflect.MethodHandleIntegerFieldAccessorImpl.getInt(Ljava/lang/Object;)I+11 java.base
j  java.lang.reflect.Field.getInt(Ljava/lang/Object;)I+22 java.base
j  java.lang.invoke.MethodHandleNatives.verifyConstants()Z+48 java.base
j  java.lang.invoke.MethodHandleNatives.<clinit>()V+85 java.base
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x8a0858]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4cc
V  [libjvm.dylib+0x86b728]  InstanceKlass::call_class_initializer(JavaThread*)+0x264
V  [libjvm.dylib+0x86a49c]  InstanceKlass::initialize_impl(JavaThread*)+0x894
V  [libjvm.dylib+0x101ff4c]  Threads::initialize_jsr292_core_classes(JavaThread*)+0x12c
V  [libjvm.dylib+0x10207e4]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x880
V  [libjvm.dylib+0x977124]  JNI_CreateJavaVM+0xa8
C  [libjli.dylib+0x4728]  JavaMain+0x104
C  [libjli.dylib+0x72f4]  ThreadJavaMain+0xc
C  [libsystem_pthread.dylib+0x7878]  _pthread_start+0x140
Comments
Changeset: 91391598 Author: Denghui Dong <ddong@openjdk.org> Date: 2022-01-28 22:52:32 +0000 URL: https://git.openjdk.java.net/jdk/commit/91391598989c70c98b9400997df4f9177d3e576f
28-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7260 Date: 2022-01-28 07:41:21 +0000
28-01-2022

I will take a look at this.
28-01-2022

Giving the timing and the platform it is quite possible this crash has also been caused by the changes in JDK-8277948.
28-01-2022