-
Bug
-
Resolution: Duplicate
-
P3
-
8u391
-
x86_64
-
linux_ubuntu
ADDITIONAL SYSTEM INFORMATION :
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
A DESCRIPTION OF THE PROBLEM :
I ran a modified regression testcase on JDK8u392 and found that the JVM crashed with -Xcomp -XX:-TieredCompilation options.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/data//jdk8u/hotspot/src/share/vm/opto/node.hpp:792), pid=84055, tid=0x00007f9f7a252700
# assert(is_Loop()) failed: invalid node class
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java -Xcomp -XX:-TieredCompilation compiler.loopopts.TestIterationSplitWithRegionHead
ACTUAL -
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/node.hpp:792
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/data//jdk8u/hotspot/src/share/vm/opto/node.hpp:792), pid=84055, tid=0x00007f9f7a252700
# assert(is_Loop()) failed: invalid node class
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home//repository//toreport/TestIterationSplitWithRegionHead_09_24_02_02_31/hs_err_pid84055.log
#
# Compiler replay data is saved as:
# /home//repository//toreport/TestIterationSplitWithRegionHead_09_24_02_02_31/replay_pid84055.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
---------- BEGIN SOURCE ----------
package compiler.loopopts;
public class TestIterationSplitWithRegionHead {
static boolean flagFalse = false;
public static void main(String[] args) {
// modified code
try {
Class <?> Class0 = Class.forName("compiler.loopopts.TestIterationSplitWithRegionHead");
Class0.getDeclaredMethod("test").invoke(null);
}catch (Exception eeeeeeee){throw new RuntimeException(eeeeeeee);}
// test();
}
public static void test() {
// 1) The loop tree is built. We find that nested loop N2 is an infinite loop and add a NeverBranch
// to the inner loop to make it reachable. But the current loop tree does not have N2, yet. The
// resulting loop tree is:
//
// Loop: N0/N0 has_call has_sfpt
// Loop: N77/N121 has_call // N1 outer
// Loop: N77/N111 has_call sfpts={ 111 97 } // N1 inner
//
// 2) beautify_loops() finds that the outer loop head of N1 is shared and thus adds a new region
// in merge_many_backedges(). As a result, the loop tree is built again. This time, the NeverBranch
// in the inner loop of N2 allows that a loop tree can be built for it:
//
// Loop: N0/N0 has_call has_sfpt
// Loop: N216/N213 limit_check profile_predicated predicated has_call sfpts={ 111 97 } // N1 shared loop head
// Loop: N196/N201 sfpts={ 201 } // N2 inner loop now discovered with the new NeverBranch
//
// However, a LoopNode is only added by beautify_loops() which won't be called until the next iteration of loop opts.
// This means that we have a Region node (N196) as head in the loop tree which cannot be handled by iteration_split_impl()
// resulting in an assertion failure.
// Nested loop N1
while (flagFalse) {
while (dontInlineFalse()) {
}
}
dontInlineFalse();
// Nested loop N2
while (flagFalse) {
while (true) ; // Detected as infinite inner loop by C2 -> NeverBranch added
}
}
public static boolean dontInlineFalse() {
return false;
}
}
---------- END SOURCE ----------
FREQUENCY : always
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
A DESCRIPTION OF THE PROBLEM :
I ran a modified regression testcase on JDK8u392 and found that the JVM crashed with -Xcomp -XX:-TieredCompilation options.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/data//jdk8u/hotspot/src/share/vm/opto/node.hpp:792), pid=84055, tid=0x00007f9f7a252700
# assert(is_Loop()) failed: invalid node class
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java -Xcomp -XX:-TieredCompilation compiler.loopopts.TestIterationSplitWithRegionHead
ACTUAL -
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/node.hpp:792
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/data//jdk8u/hotspot/src/share/vm/opto/node.hpp:792), pid=84055, tid=0x00007f9f7a252700
# assert(is_Loop()) failed: invalid node class
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home//repository//toreport/TestIterationSplitWithRegionHead_09_24_02_02_31/hs_err_pid84055.log
#
# Compiler replay data is saved as:
# /home//repository//toreport/TestIterationSplitWithRegionHead_09_24_02_02_31/replay_pid84055.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
---------- BEGIN SOURCE ----------
package compiler.loopopts;
public class TestIterationSplitWithRegionHead {
static boolean flagFalse = false;
public static void main(String[] args) {
// modified code
try {
Class <?> Class0 = Class.forName("compiler.loopopts.TestIterationSplitWithRegionHead");
Class0.getDeclaredMethod("test").invoke(null);
}catch (Exception eeeeeeee){throw new RuntimeException(eeeeeeee);}
// test();
}
public static void test() {
// 1) The loop tree is built. We find that nested loop N2 is an infinite loop and add a NeverBranch
// to the inner loop to make it reachable. But the current loop tree does not have N2, yet. The
// resulting loop tree is:
//
// Loop: N0/N0 has_call has_sfpt
// Loop: N77/N121 has_call // N1 outer
// Loop: N77/N111 has_call sfpts={ 111 97 } // N1 inner
//
// 2) beautify_loops() finds that the outer loop head of N1 is shared and thus adds a new region
// in merge_many_backedges(). As a result, the loop tree is built again. This time, the NeverBranch
// in the inner loop of N2 allows that a loop tree can be built for it:
//
// Loop: N0/N0 has_call has_sfpt
// Loop: N216/N213 limit_check profile_predicated predicated has_call sfpts={ 111 97 } // N1 shared loop head
// Loop: N196/N201 sfpts={ 201 } // N2 inner loop now discovered with the new NeverBranch
//
// However, a LoopNode is only added by beautify_loops() which won't be called until the next iteration of loop opts.
// This means that we have a Region node (N196) as head in the loop tree which cannot be handled by iteration_split_impl()
// resulting in an assertion failure.
// Nested loop N1
while (flagFalse) {
while (dontInlineFalse()) {
}
}
dontInlineFalse();
// Nested loop N2
while (flagFalse) {
while (true) ; // Detected as infinite inner loop by C2 -> NeverBranch added
}
}
public static boolean dontInlineFalse() {
return false;
}
}
---------- END SOURCE ----------
FREQUENCY : always
- duplicates
-
JDK-8279837 C2: assert(is_Loop()) failed: invalid node class: Region
-
- Closed
-