-
Bug
-
Resolution: Fixed
-
P3
-
9, 11, 15, 16
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8258874 | 11.0.11 | Vladimir Kozlov | P3 | Resolved | Fixed | b01 |
JDK-8251917 | 11.0.10-oracle | Vladimir Kozlov | P3 | Resolved | Fixed | b01 |
ADDITIONAL SYSTEM INFORMATION :
Intel i7-8650u 32GB
Windows 10
OpenJDK 14.0.2
A DESCRIPTION OF THE PROBLEM :
I have a very small code:
public static void main(String[] args) {
int n = 4096;
long[] data = new long[n * n];
for (int k = 0; k < n; k++) {
IntStream.range(0, n).forEach(j -> {
for (int i = 0; i < n; i++)
data[j * n + i]++;
});
}
}
which has the following output:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd01641aee, pid=27584, tid=15100
#
# JRE version: OpenJDK Runtime Environment (14.0.2+12) (build 14.0.2+12-46)
# Java VM: OpenJDK 64-Bit Server VM (14.0.2+12-46, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# V [jvm.dll+0x6b1aee]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\elszszo\git\eulerproject\hs_err_pid27584.log
#
# Compiler replay data is saved as:
# C:\Users\elszszo\git\eulerproject\replay_pid27584.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
If I remove either the outer loop (k), or if I use only j*n or i or j as the array index in the increment line instead of the composite j*n + i , it runs without any issue.
REGRESSION : Last worked in version 8u261
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just execute the following method included
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should be executed without jre crash, with no output.
ACTUAL -
jre crash:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd01641aee, pid=27584, tid=15100
#
# JRE version: OpenJDK Runtime Environment (14.0.2+12) (build 14.0.2+12-46)
# Java VM: OpenJDK 64-Bit Server VM (14.0.2+12-46, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# V [jvm.dll+0x6b1aee]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\elszszo\git\eulerproject\hs_err_pid27584.log
#
# Compiler replay data is saved as:
# C:\Users\elszszo\git\eulerproject\replay_pid27584.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
---------- BEGIN SOURCE ----------
@Test
public void test() {
int n = 4096;
long[] data = new long[n * n];
for (int k = 0; k < n; k++) {
IntStream.range(0, n).forEach(j -> {
for (int i = 0; i < n; i++)
data[j * n + i]++;
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
if I replace the Instream with a conservative for-loop, it works.
FREQUENCY : always
Intel i7-8650u 32GB
Windows 10
OpenJDK 14.0.2
A DESCRIPTION OF THE PROBLEM :
I have a very small code:
public static void main(String[] args) {
int n = 4096;
long[] data = new long[n * n];
for (int k = 0; k < n; k++) {
IntStream.range(0, n).forEach(j -> {
for (int i = 0; i < n; i++)
data[j * n + i]++;
});
}
}
which has the following output:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd01641aee, pid=27584, tid=15100
#
# JRE version: OpenJDK Runtime Environment (14.0.2+12) (build 14.0.2+12-46)
# Java VM: OpenJDK 64-Bit Server VM (14.0.2+12-46, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# V [jvm.dll+0x6b1aee]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\elszszo\git\eulerproject\hs_err_pid27584.log
#
# Compiler replay data is saved as:
# C:\Users\elszszo\git\eulerproject\replay_pid27584.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
If I remove either the outer loop (k), or if I use only j*n or i or j as the array index in the increment line instead of the composite j*n + i , it runs without any issue.
REGRESSION : Last worked in version 8u261
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just execute the following method included
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should be executed without jre crash, with no output.
ACTUAL -
jre crash:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd01641aee, pid=27584, tid=15100
#
# JRE version: OpenJDK Runtime Environment (14.0.2+12) (build 14.0.2+12-46)
# Java VM: OpenJDK 64-Bit Server VM (14.0.2+12-46, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# V [jvm.dll+0x6b1aee]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\elszszo\git\eulerproject\hs_err_pid27584.log
#
# Compiler replay data is saved as:
# C:\Users\elszszo\git\eulerproject\replay_pid27584.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
---------- BEGIN SOURCE ----------
@Test
public void test() {
int n = 4096;
long[] data = new long[n * n];
for (int k = 0; k < n; k++) {
IntStream.range(0, n).forEach(j -> {
for (int i = 0; i < n; i++)
data[j * n + i]++;
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
if I replace the Instream with a conservative for-loop, it works.
FREQUENCY : always
- backported by
-
JDK-8251917 modify a primitive array through a stream and a for cycle causes jre crash
- Resolved
-
JDK-8258874 modify a primitive array through a stream and a for cycle causes jre crash
- Resolved
- relates to
-
JDK-8251994 VM crashed running TestComplexAddrExpr.java test with -XX:UseAVX=X
- Closed
-
JDK-8076284 Improve vectorization of parallel streams
- Resolved
-
JDK-8251925 C2: RenaissanceStressTest fails with assert(!had_error): bad dominance
- Resolved