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

AArch64: Fix interpreter code at JVMCI deoptimization entry



    • b32
    • aarch64
    • linux



        HotSpot crashes after a Graal-compiled synchronized method is deoptimized and then returned in interpreter. This happens only on AArch64.

        This can be reproduced by below Java program with VM options
        "-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=graal".

        public class Test {
          public static synchronized int hash(Object o) { return o.hashCode(); }
          public static void main(String[] args) throws Exception {
            int sum = 0;
            for (int i = 0; i < 30000; i++) {
              sum += hash(i);
            sum += hash("Shanghai");

        $ javac Test.java
        $ java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=graal Test
        # A fatal error has been detected by the Java Runtime Environment:
        # SIGBUS (0x7) at pc=0x0000ffff8f93b9b4, pid=12666, tid=12667
        # JRE version: OpenJDK Runtime Environment (12.0) (build 12-internal+0-adhoc.penli01.jdksrc)
        # Java VM: OpenJDK 64-Bit Server VM (12-internal+0-adhoc.penli01.jdksrc, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, g1 gc, linux-aarch64)
        # Problematic frame:
        # j Test.hash(Ljava/lang/Object;)I+4
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/penli01/core.12666)
        # An error report file with more information is saved as:
        # /home/penli01/hs_err_pid12666.log
        Loaded disassembler from /usr/lib/jvm/jdk-12/lib/hsdis-aarch64.so
        # If you would like to submit a bug report, please visit:
        # http://bugreport.java.com/bugreport/crash.jsp
        Aborted (core dumped)

        --------------- S U M M A R Y ------------

        Command Line: -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=graal Test

        Host: AArch64, 224 cores, 125G, Ubuntu 18.04.2 LTS
        Time: Fri Jul 26 01:21:31 2019 UTC elapsed time: 32 seconds (0d 0h 0m 32s)

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

        Current thread (0x0000ffffac011000): JavaThread "main" [_thread_in_Java, id=12667, stack(0x0000ffffb1e5a000,0x0000ffffb205a000)]

        Stack: [0x0000ffffb1e5a000,0x0000ffffb205a000], sp=0x0000ffffb2058310, free space=2040k
        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        j Test.hash(Ljava/lang/Object;)I+4
        j Test.main([Ljava/lang/String;)V+34
        v ~StubRoutines::call_stub
        V [libjvm.so+0x6ee4d4] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x364
        V [libjvm.so+0x76ff58] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) [clone .isra.67] [clone .constprop.192]+0x280
        V [libjvm.so+0x772544] jni_CallStaticVoidMethod+0x12c
        C [libjli.so+0x5974] JavaMain+0xe84
        C [libpthread.so.0+0x7088] start_thread+0xb0

        siginfo: si_signo: 7 (SIGBUS), si_code: 1 (BUS_ADRALN), si_addr: 0x00000000d74e312b


          Issue Links



                pli Pengfei Li
                pli Pengfei Li
                0 Vote for this issue
                2 Start watching this issue