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

C2 hits "assert(is_If()) failed: invalid node class: Con" during IGVN due to unhandled top

XMLWordPrintable

    • b22

      The attached Java Fuzzer test found the following bug after JDK-8342287:

      To reproduce:
      $ java -XX:CompileCommand=compileonly,Test::vMeth1 -XX:-TieredCompilation -Xcomp -XX:+StressIGVN -XX:CompileCommand=RepeatCompilation,*::vMeth1,1000 Test.java
      $ java -XX:CompileCommand=compileonly,Reduced::test -XX:-TieredCompilation -Xcomp -XX:+StressIGVN -XX:CompileCommand=RepeatCompilation,*::test,1000 Reduced.java

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/7a20d425-e769-4142-b5c1-e3cc2d88e03e-S53030/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1450123d-95a2-42ff-803f-f978bdd9f776/runs/be4b8fb8-f184-4476-8503-8141c40dd927/workspace/open/src/hotspot/share/opto/node.hpp:924), pid=32787, tid=24579
      # assert(is_If()) failed: invalid node class: Con
      .........
      Command Line: -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:StressSeed=1854871149 -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0 -XX:+VerifyLoopOptimizations -XX:VerifyIterativeGVN=10 -XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/23/37/bundles/macos-aarch64/jdk-23_macos-aarch64_bin.tar.gz/jdk-23.jdk/Contents/Home -Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/a20696e7-ae7d-4d37-8e9c-83f99ef002cb-S38015/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ca395808-3285-4853-8012-57928cd6dcb9/runs/3ee51f8c-5bc1-4337-a889-d23c4c2e6861/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_BigTest_java/tmp Test
      ............
      Current CompileTask:
      C2:128 8 b Test::vMeth1 (214 bytes)

      Stack: [0x000000016f66c000,0x000000016f86f000], sp=0x000000016f86aed0, free space=2043k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.dylib+0x1163ca8] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x548 (node.hpp:924)
      V [libjvm.dylib+0x1164458] VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*)+0x0
      V [libjvm.dylib+0x568498] print_error_for_unit_test(char const*, char const*, char*)+0x0
      V [libjvm.dylib+0xea3d70] AssertionPredicateWithHalt::has_assertion_predicate_opaque(Node const*)+0x0
      V [libjvm.dylib+0xea3ae0] AssertionPredicateWithHalt::is_predicate(Node const*)+0x54
      V [libjvm.dylib+0xea39f0] AssertionPredicatesWithHalt::find_entry(Node*)+0x34
      V [libjvm.dylib+0xc99818] CountedLoopNode::is_canonical_loop_entry()+0x24
      V [libjvm.dylib+0x3c7cb0] RegionNode::Ideal(PhaseGVN*, bool)+0x7a4
      V [libjvm.dylib+0xe96064] PhaseIterGVN::transform_old(Node*)+0x164
      V [libjvm.dylib+0xe95558] PhaseIterGVN::optimize()+0xf8
      V [libjvm.dylib+0x4d310c] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x128
      V [libjvm.dylib+0x4cbf70] Compile::Optimize()+0x81c
      V [libjvm.dylib+0x4ca340] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x13c4
      V [libjvm.dylib+0x38ea20] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1e0
      V [libjvm.dylib+0x4e8fa8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x868
      V [libjvm.dylib+0x4e83d8] CompileBroker::compiler_thread_loop()+0x348
      V [libjvm.dylib+0x8b3bd0] JavaThread::thread_main_inner()+0x1dc
      V [libjvm.dylib+0x10a1ea0] Thread::call_run()+0xf4
      V [libjvm.dylib+0xe3ea0c] thread_native_entry(Thread*)+0x138
      C [libsystem_pthread.dylib+0x726c] _pthread_start+0x94

        1. hs_err_pid32787.log
          87 kB
        2. Reduced.java
          0.4 kB
        3. Test.java
          7 kB

            chagedorn Christian Hagedorn
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: