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

SIGFPE in PhaseIdealLoop::extract_long_range_checks

XMLWordPrintable

    • b13
    • 19
    • b16

        java -Xcomp -XX:CompileCommand=compileonly,Test::test1 -XX:-TieredCompilation Test.java

        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGFPE (0x8) at pc=0x00007f411f99523c, pid=3536485, tid=3536499
        #
        # JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-internal-2024-01-05-0754282.tobias...)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-internal-2024-01-05-0754282.tobias..., compiled mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x128923c] PhaseIdealLoop::extract_long_range_checks(IdealLoopTree const*, long, int, PhiNode*, Node_List&)+0x17c
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

        Current CompileTask:
        C2:4257 84 b Test::test1 (32 bytes)

        Stack: [0x00007f40fceb0000,0x00007f40fcfb1000], sp=0x00007f40fcfaba80, free space=1006k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x128923c] PhaseIdealLoop::extract_long_range_checks(IdealLoopTree const*, long, int, PhiNode*, Node_List&)+0x17c (loopnode.cpp:1109)
        V [libjvm.so+0x12a2416] PhaseIdealLoop::create_loop_nest(IdealLoopTree*, Node_List&)+0x296 (loopnode.cpp:837)
        V [libjvm.so+0x127f658] IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&)+0x478 (loopTransform.cpp:3645)
        V [libjvm.so+0x127f92e] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x17e (loopTransform.cpp:3769)
        V [libjvm.so+0x12ac608] PhaseIdealLoop::build_and_optimize()+0xdf8 (loopnode.cpp:4621)
        V [libjvm.so+0x9e9ab8] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x388 (loopnode.hpp:1112)
        V [libjvm.so+0x9e4553] Compile::Optimize()+0x4c3 (compile.cpp:2385)
        V [libjvm.so+0x9e84d4] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b44 (compile.cpp:860)
        V [libjvm.so+0x83d3c5] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5 (c2compiler.cpp:142)
        V [libjvm.so+0x9f3eec] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x92c (compileBroker.cpp:2299)
        V [libjvm.so+0x9f4b78] CompileBroker::compiler_thread_loop()+0x468 (compileBroker.cpp:1958)
        V [libjvm.so+0xeb988c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:721)
        V [libjvm.so+0x179d2d6] Thread::call_run()+0xb6 (thread.cpp:220)
        V [libjvm.so+0x14a9ce7] thread_native_entry(Thread*)+0x127 (os_linux.cpp:789)


        java -Xcomp -XX:CompileCommand=compileonly,Test::test2 -XX:-TieredCompilation Test.java

        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/oracle/jdk3/open/src/hotspot/share/utilities/checkedCast.hpp:41), pid=3536591, tid=3536607
        # assert(static_cast<T1>(result) == thing) failed: must be
        #
        # JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-internal-2024-01-05-0754282.tobias...)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-internal-2024-01-05-0754282.tobias..., compiled mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x12a1b70] PhaseIdealLoop::transform_long_range_checks(int, Node_List const&, Node*, Node*, Node*, Node*, LoopNode*)+0xcc0
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

        Current CompileTask:
        C2:4161 88 b Test::test2 (32 bytes)

        Stack: [0x00007f8edd335000,0x00007f8edd436000], sp=0x00007f8edd4309e0, free space=1006k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x12a1b70] PhaseIdealLoop::transform_long_range_checks(int, Node_List const&, Node*, Node*, Node*, Node*, LoopNode*)+0xcc0 (checkedCast.hpp:41)
        V [libjvm.so+0x12a317c] PhaseIdealLoop::create_loop_nest(IdealLoopTree*, Node_List&)+0xffc (loopnode.cpp:1056)
        V [libjvm.so+0x127f658] IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&)+0x478 (loopTransform.cpp:3645)
        V [libjvm.so+0x127f92e] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x17e (loopTransform.cpp:3769)
        V [libjvm.so+0x12ac608] PhaseIdealLoop::build_and_optimize()+0xdf8 (loopnode.cpp:4621)
        V [libjvm.so+0x9e9ab8] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x388 (loopnode.hpp:1112)
        V [libjvm.so+0x9e4553] Compile::Optimize()+0x4c3 (compile.cpp:2385)
        V [libjvm.so+0x9e84d4] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b44 (compile.cpp:860)
        V [libjvm.so+0x83d3c5] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5 (c2compiler.cpp:142)
        V [libjvm.so+0x9f3eec] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x92c (compileBroker.cpp:2299)
        V [libjvm.so+0x9f4b78] CompileBroker::compiler_thread_loop()+0x468 (compileBroker.cpp:1958)
        V [libjvm.so+0xeb988c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:721)
        V [libjvm.so+0x179d2d6] Thread::call_run()+0xb6 (thread.cpp:220)
        V [libjvm.so+0x14a9ce7] thread_native_entry(Thread*)+0x127 (os_linux.cpp:789)

        Looks like the issue was introduced by JDK-8278296 in JDK 19 b13. I recently found and filed another, potentially related, issue with long loop opts (JDK-8323972).

          1. hs_err_pid3536485.log
            77 kB
          2. hs_err_pid3536591.log
            77 kB
          3. replay_pid3536485.log
            248 kB
          4. replay_pid3536591.log
            250 kB
          5. Test.java
            2 kB

              roland Roland Westrelin
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: