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

[lworld] CallStaticJavaNode::remove_useless_allocation does not handle dying subgraph

XMLWordPrintable

      When running test java/lang/System/LoggerFinder/internal/backend/LoggerFinderBackendTest.java with --enable-preview and -Xcomp, the VM crashes with the following message:

      Testing Logger.log(Level.*, "[foo]-66") on sun.util.logging.internal.LoggingProviderImpl$JULWrapper@711a368
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/open/src/hotspot/share/opto/callnode.cpp:1230), pid=648476, tid=648493
      # assert(call->in(0)->is_Proj() && call->in(0)->in(0)->is_MemBar()) failed: missing membar
      #
      # JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-lworld5ea-2024-06-21-1558186.fred...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-lworld5ea-2024-06-21-1558186.fred..., compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x88eb11] CallStaticJavaNode::remove_useless_allocation(PhaseGVN*, Node*, Node*, Node*)+0x1161
      #

      Stack trace:

      Current thread (0x000073b6b4470e80): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=648493, stack(0x000073b693500000,0x000073b693600000) (1024K)]


      Current CompileTask:
      C2:88510 10886 !b 4 LoggerFinderBackendTest$JdkLogMethodInvoker::logX (283 bytes)

      Stack: [0x000073b693500000,0x000073b693600000], sp=0x000073b6935fadc0, free space=1003k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x88eb11] CallStaticJavaNode::remove_useless_allocation(PhaseGVN*, Node*, Node*, Node*)+0x1161 (callnode.cpp:1230)
      V [libjvm.so+0x88dbf1] CallStaticJavaNode::remove_useless_allocation(PhaseGVN*, Node*, Node*, Node*)+0x241 (callnode.cpp:1209)
      V [libjvm.so+0x893eed] CallStaticJavaNode::Ideal(PhaseGVN*, bool)+0x22d (callnode.cpp:1128)
      V [libjvm.so+0x15f7ded] PhaseIterGVN::transform_old(Node*)+0xbd (phaseX.cpp:668)
      V [libjvm.so+0x15ee0d4] PhaseIterGVN::optimize()+0x94 (phaseX.cpp:1046)
      V [libjvm.so+0xa3c8f6] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x4d6 (loopnode.hpp:1196)
      V [libjvm.so+0xa35155] Compile::optimize_loops(PhaseIterGVN&, LoopOptsMode)+0x75 (compile.cpp:2676)
      V [libjvm.so+0xa37609] Compile::Optimize()+0xfa9 (compile.cpp:2928)
      V [libjvm.so+0xa3ae84] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1cc4 (compile.cpp:874)
      V [libjvm.so+0x878ce2] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1f2 (c2compiler.cpp:143)
      V [libjvm.so+0xa46cec] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x92c (compileBroker.cpp:2305)
      V [libjvm.so+0xa47968] CompileBroker::compiler_thread_loop()+0x458 (compileBroker.cpp:1964)
      V [libjvm.so+0xf4987c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:722)
      V [libjvm.so+0x1875f56] Thread::call_run()+0xb6 (thread.cpp:221)
      V [libjvm.so+0x155fd87] thread_native_entry(Thread*)+0x127 (os_linux.cpp:816)
      C [libc.so.6+0x9ca94]
      Registers:
      RAX=0x000073b6bb1a3000, RBX=0x0000000020020000, RCX=0x000073b6ba560144, RDX=0x000073b6ba5eeb60
      RSP=0x000073b6935fadc0, RBP=0x000073b6935faea0, RSI=0x00000000000004ce, RDI=0x000073b6ba5ee290
      R8 =0x000073b6481b5dc8, R9 =0x000073b6301d2918, R10=0x0000000000000000, R11=0x0000000000000000
      R12=0x000073b6301d2918, R13=0x000073b649b5a398, R14=0x000073b6481cd070, R15=0x0000000000000016
      RIP=0x000073b6b928eb11, EFLAGS=0x0000000000010297, CSGSFS=0x002b000000000033, ERR=0x0000000000000006
        TRAPNO=0x000000000000000e


      The crash occurs on both x64 and aarch64.
      The crash doesn't occur if --enable-preview is not used.

            thartmann Tobias Hartmann
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: