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

Unreachable loop is not removed from C2 IR, leading to a broken graph

XMLWordPrintable

    • b30

        The following test failed in the JDK19 CI:

        applications/helidonapp/HelidonAppTest

        Here's a snippet from the log file:

        2022.04.05 00:32:22 INFO io.helidon.microprofile.server.ServerCdiExtension Thread[HelidonAppStressModule,5,main]: Registering JAX-RS Application: HelidonMP
        2022.04.05 00:32:28 INFO io.helidon.webserver.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0xbf9f6e32, L:/[0:0:0:0:0:0:0:0]:8080]
        2022.04.05 00:32:28 INFO io.helidon.microprofile.server.ServerCdiExtension Thread[HelidonAppStressModule,5,main]: Server started on http://localhost:8080 (and all other host addresses) in 17893 milliseconds (since JVM startup).
        2022.04.05 00:32:30 INFO io.helidon.common.HelidonFeatures Thread[features-thread,5,main]: Helidon MP 2.4.2 features: [CDI, Config, Fault Tolerance, Health, JAX-RS, Metrics, Open API, REST Client, Security, Server, Tracing]
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (t:\\workspace\\open\\src\\hotspot\\share\\opto\\macro.cpp:508), pid=67116, tid=21240
        # assert(false) failed: unexpected node
        #
        # JRE version: Java(TM) SE Runtime Environment (19.0+17) (fastdebug build 19-ea+17-1108)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-ea+17-1108, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
        # Core dump will be written. Default location: T:\\testoutput\\test-support\\jtreg_closed_test_hotspot_jtreg_applications_helidonapp_HelidonAppTest_java\\scratch\\0\\hs_err_pid67116.mdmp
        #
        # JFR recording file will be written. Location: T:\\testoutput\\test-support\\jtreg_closed_test_hotspot_jtreg_applications_helidonapp_HelidonAppTest_java\\scratch\\0\\hs_err_pid67116.jfr
        #
        Unsupported internal testing APIs have been used.

        # An error report file with more information is saved as:
        # T:\\testoutput\\test-support\\jtreg_closed_test_hotspot_jtreg_applications_helidonapp_HelidonAppTest_java\\scratch\\0\\hs_err_pid67116.log
        #
        # Compiler replay data is saved as:
        # T:\\testoutput\\test-support\\jtreg_closed_test_hotspot_jtreg_applications_helidonapp_HelidonAppTest_java\\scratch\\0\\replay_pid67116.log
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        #
        ----------System.err:(153/72802)*----------


        Here's the crashing thread's stack:

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

        Current thread (0x0000016d72f719e0): JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=21240, stack(0x00000051e5600000,0x00000051e5700000)]


        Current CompileTask:
        C2: 80047 12880 4 io.helidon.examples.quickstart.mp.GreetResource$Proxy$_$$_WeldSubclass::lifecycle_mixin_$$_postConstruct (20 bytes)

        Stack: [0x00000051e5600000,0x00000051e5700000]
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [jvm.dll+0xbdf301] os::platform_print_native_stack+0xf1 (os_windows_x86.cpp:235)
        V [jvm.dll+0xe2028f] VMError::report+0x101f (vmError.cpp:828)
        V [jvm.dll+0xe21cee] VMError::report_and_die+0x7fe (vmError.cpp:1657)
        V [jvm.dll+0xe22474] VMError::report_and_die+0x64 (vmError.cpp:1438)
        V [jvm.dll+0x550e37] report_vm_error+0xb7 (debug.cpp:282)
        V [jvm.dll+0xa85191] PhaseMacroExpand::value_from_mem+0x3d1 (macro.cpp:508)
        V [jvm.dll+0xa83bfd] PhaseMacroExpand::scalar_replacement+0x89d (macro.cpp:770)
        V [jvm.dll+0xa7968f] PhaseMacroExpand::eliminate_allocate_node+0x1df (macro.cpp:1049)
        V [jvm.dll+0xa7a1ca] PhaseMacroExpand::eliminate_macro_nodes+0x29a (macro.cpp:2354)
        V [jvm.dll+0x507a08] Compile::Optimize+0xaa8 (compile.cpp:2204)
        V [jvm.dll+0x504e13] Compile::Compile+0x14c3 (compile.cpp:817)
        V [jvm.dll+0x4281a5] C2Compiler::compile_method+0x145 (c2compiler.cpp:115)
        V [jvm.dll+0x51e4a1] CompileBroker::invoke_compiler_on_method+0x931 (compileBroker.cpp:2294)
        V [jvm.dll+0x51bab6] CompileBroker::compiler_thread_loop+0x276 (compileBroker.cpp:1968)
        V [jvm.dll+0xd9efc7] JavaThread::thread_main_inner+0x297 (thread.cpp:1292)
        V [jvm.dll+0xd94dbc] Thread::call_run+0x1ac (thread.cpp:361)
        V [jvm.dll+0xbddcd9] thread_native_entry+0xb9 (os_windows.cpp:544)
        C [ucrtbase.dll+0x1fb80]
        C [KERNEL32.DLL+0x84d4]
        C [ntdll.dll+0x51791]

          1. hs_err_pid674390.log
            72 kB
          2. hs_err_pid675177.log
            71 kB
          3. patch.txt
            8 kB
          4. Test.java
            0.5 kB
          5. TestDeadDataLoop.java
            5 kB

              thartmann Tobias Hartmann
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: