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

TailCall should not use frame pointer register for jump target

    XMLWordPrintable

Details

    • b22
    • Verified

    Backports

      Description

        We can observe frequent crashes if _stress_seed is initialized to a non-zero value also for runtime stub compilation just as it is for method compilation. The issue appears to be specific to aarch64.

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0x00000000a5217f30, pid=1348773, tid=1348793
        #
        # JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build [name])
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug [name], mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
        # Problematic frame:
        # C 0x00000000a5217f30

        [...]

        Current thread (0x0000ffff9840cc20): JavaThread "MainThread" [_thread_in_Java, id=1348793, stack(0x0000ffff53208000,0x0000ffff53406000) (2040K)]

        Stack: [0x0000ffff53208000,0x0000ffff53406000], sp=0x0000ffff53403ef0, free space=2031k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        C 0x00000000a5217f30


        Run tier1 with -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN with the following patch applied to reproduce the issue:

        ---
         src/hotspot/share/opto/compile.cpp | 15 +++++++++++++++
         1 file changed, 15 insertions(+)

        diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp
        index 417f828013f92..df6511b73a3e3 100644
        --- a/src/hotspot/share/opto/compile.cpp
        +++ b/src/hotspot/share/opto/compile.cpp
        @@ -979,6 +979,21 @@ Compile::Compile( ciEnv* ci_env,
           _igvn_worklist = new (comp_arena()) Unique_Node_List(comp_arena());
           _types = new (comp_arena()) Type_Array(comp_arena());
           _node_hash = new (comp_arena()) NodeHash(comp_arena(), 255);
        +
        + // If any phase is randomized for stress testing, seed random number
        + // generation and log the seed for repeatability.
        + if (StressLCM || StressGCM || StressIGVN || StressCCP || StressIncrementalInlining || StressMacroExpansion) {
        + if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && directive->RepeatCompilationOption)) {
        + _stress_seed = static_cast<uint>(Ticks::now().nanoseconds());
        + FLAG_SET_ERGO(StressSeed, _stress_seed);
        + } else {
        + _stress_seed = StressSeed;
        + }
        + if (_log != nullptr) {
        + _log->elem("stress_test seed='%u'", _stress_seed);
        + }
        + }
        +
           {
             PhaseGVN gvn;
             set_initial_gvn(&gvn); // not significant, but GraphKit guys use it pervasively

        Attachments

          Issue Links

            Activity

              People

                thartmann Tobias Hartmann
                dskantz Daniel Skantz
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: