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

C2: "Bad graph detected in build_loop_late" with incremental inlining

    XMLWordPrintable

Details

    • b25

    Description

      Attached test run with:

      $ java -XX:+AlwaysIncrementalInline -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement TestNullAtCallAfterLateInline

      crashes with:

      Bad graph detected in build_loop_late
      n: 190 LoadI === _ 187 179 [[ 191 110 ]] @java/lang/Class (java/io/Serializable,java/lang/constant/Constable,java/lang/reflect/AnnotatedElement,java/lang/invoke/TypeDescriptor,java/lang/reflect/GenericDeclaration,java/lang/reflect/Type,java/lang/invoke/TypeDescriptor$\
      OfField):exact+124 *, name=volatileField, idx=5; Volatile! #int !orig=197 !jvms: TestNullAtCallAfterLateInline::testHelper2 @ bci:26 (line 65) TestNullAtCallAfterLateInline::test2 @ bci:17 (line 54)
      early(n): 185 MemBarVolatile === 181 1 183 1 1 184 [[ 186 187 ]] !jvms: TestNullAtCallAfterLateInline::testHelper2 @ bci:23 (line 64) TestNullAtCallAfterLateInline::test2 @ bci:17 (line 54)
      n->in(1): 187 Proj === 185 [[ 191 190 ]] #2 Memory: @BotPTR *+bot, idx=Bot; !jvms: TestNullAtCallAfterLateInline::testHelper2 @ bci:23 (line 64) TestNullAtCallAfterLateInline::test2 @ bci:17 (line 54)
      early(n->in(1)): 185 MemBarVolatile === 181 1 183 1 1 184 [[ 186 187 ]] !jvms: TestNullAtCallAfterLateInline::testHelper2 @ bci:23 (line 64) TestNullAtCallAfterLateInline::test2 @ bci:17 (line 54)
      n->in(2): 179 AddP === _ 177 177 178 [[ 184 190 ]] Oop:java/lang/Class (java/io/Serializable,java/lang/constant/Constable,java/lang/reflect/AnnotatedElement,java/lang/invoke/TypeDescriptor,java/lang/reflect/GenericDeclaration,java/lang/reflect/Type,java/lang/invoke/T\
      ypeDescriptor$OfField):exact+124 * !jvms: TestNullAtCallAfterLateInline::testHelper2 @ bci:23 (line 64) TestNullAtCallAfterLateInline::test2 @ bci:17 (line 54)
      early(n->in(2)): 0 Root === 0 43 54 65 110 111 244 [[ 0 1 3 23 24 239 28 38 49 60 80 81 178 172 176 177 231 ]]
      n->in(2)->in(1): 177 ConP === 0 [[ 179 179 ]] #java/lang/Class (java/io/Serializable,java/lang/constant/Constable,java/lang/reflect/AnnotatedElement,java/lang/invoke/TypeDescriptor,java/lang/reflect/GenericDeclaration,java/lang/reflect/Type,java/lang/invoke/TypeDescri\
      ptor$OfField):exact * Oop:java/lang/Class (java/io/Serializable,java/lang/constant/Constable,java/lang/reflect/AnnotatedElement,java/lang/invoke/TypeDescriptor,java/lang/reflect/GenericDeclaration,java/lang/reflect/Type,java/lang/invoke/TypeDescriptor$OfField):exact *
      early(n->in(2)->in(1)): 0 Root === 0 43 54 65 110 111 244 [[ 0 1 3 23 24 239 28 38 49 60 80 81 178 172 176 177 231 ]]
      n->in(2)->in(2): 177 ConP === 0 [[ 179 179 ]] #java/lang/Class (java/io/Serializable,java/lang/constant/Constable,java/lang/reflect/AnnotatedElement,java/lang/invoke/TypeDescriptor,java/lang/reflect/GenericDeclaration,java/lang/reflect/Type,java/lang/invoke/TypeDescri\
      ptor$OfField):exact * Oop:java/lang/Class (java/io/Serializable,java/lang/constant/Constable,java/lang/reflect/AnnotatedElement,java/lang/invoke/TypeDescriptor,java/lang/reflect/GenericDeclaration,java/lang/reflect/Type,java/lang/invoke/TypeDescriptor$OfField):exact *
      early(n->in(2)->in(2)): 0 Root === 0 43 54 65 110 111 244 [[ 0 1 3 23 24 239 28 38 49 60 80 81 178 172 176 177 231 ]]
      n->in(2)->in(3): 178 ConL === 0 [[ 179 ]] #long:124
      early(n->in(2)->in(3)): 0 Root === 0 43 54 65 110 111 244 [[ 0 1 3 23 24 239 28 38 49 60 80 81 178 172 176 177 231 ]]

      LCA(n): 88 IfFalse === 263 [[ 126 ]] #0 !jvms: TestNullAtCallAfterLateInline::test2 @ bci:5 (line 52)
      n->out(0): 191 MemBarAcquire === 186 1 187 1 1 190 [[ 192 193 ]] !jvms: TestNullAtCallAfterLateInline::testHelper2 @ bci:26 (line 65) TestNullAtCallAfterLateInline::test2 @ bci:17 (line 54)
      n->out(0)->out(0): 192 Proj === 191 [[ 175 ]] #0 !jvms: TestNullAtCallAfterLateInline::testHelper2 @ bci:26 (line 65) TestNullAtCallAfterLateInline::test2 @ bci:17 (line 54)
      n->out(1): 110 Return === 175 195 196 8 9 returns 190 [[ 0 ]]
      n->out(1)->out(0): 0 Root === 0 43 54 65 110 111 244 [[ 0 1 3 23 24 239 28 38 49 60 80 81 178 172 176 177 231 ]]

      idoms of early "185 MemBarVolatile":
      idom[4]: 88 IfFalse
      idom[3]: 126 If
      idom[2]: 128 IfFalse
      idom[1]: 180 MemBarRelease
      idom[0]: 181 Proj
      n: 185 MemBarVolatile

      idoms of (wrong) LCA "88 IfFalse":
      n: 88 IfFalse

      Real LCA of early "185 MemBarVolatile" (idom[4]) and wrong LCA "88 IfFalse":
        88 IfFalse === 263 [[ 126 ]] #0 !jvms: TestNullAtCallAfterLateInline::test2 @ bci:5 (line 52)

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/roland/jdk-jdk/src/hotspot/share/opto/loopnode.cpp:6144), pid=3337877, tid=3337891
      # assert(false) failed: Bad graph detected in build_loop_late
      #
      # JRE version: OpenJDK Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.roland.jdk-jdk)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 22-internal-adhoc.roland.jdk-jdk, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x12daf8e] PhaseIdealLoop::build_loop_late_post_work(Node*, bool)+0x99e
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/roland/tmp/core.3337877)
      #
      # An error report file with more information is saved as:
      # /home/roland/tmp/hs_err_pid3337877.log
      #
      # Compiler replay data is saved as:
      # /home/roland/tmp/replay_pid3337877.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      Aborted (core dumped)

      Likely caused by JDK-8297933

      Attachments

        Issue Links

          Activity

            People

              roland Roland Westrelin
              roland Roland Westrelin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: