ADDITIONAL SYSTEM INFORMATION :
Windows Server 2022, OpenJDK 64-Bit Server VM Corretto-11.0.23.9.1
A DESCRIPTION OF THE PROBLEM :
We experienced multiple crashes on internal and customer systems with the same error when the VM attempted to compile the same function, see the shortended crash log below:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (buildOopMap.cpp:297), pid=8012, tid=7968
# guarantee(0) failed: must find derived/base pair
#
# JRE version: OpenJDK Runtime Environment Corretto-11.0.23.9.1 (11.0.23+9) (build 11.0.23+9-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-11.0.23.9.1 (11.0.23+9-LTS, mixed mode, tiered, parallel gc, windows-amd64)
#
# If you would like to submit a bug report, please visit:
# https://github.com/corretto/corretto-11/issues/
#
--------------- S U M M A R Y ------------
Command Line: -XX:+UseParallelGC -XX:+DisableExplicitGC -Xverify:none -XX:ReservedCodeCacheSize=2048m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -XX:StringTableSize=1500007 -DcheckCMCompatibilityComplete=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.util.zip.disableZip64ExtraFieldValidation=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED exit abort -Xms4096m -Xmx786432m -Xss512k
Host: Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz, 8 cores, 1023G, Windows Server 2022 , 64 bit Build 20348 (10.0.20348.3089)
--------------- T H R E A D ---------------
Current thread (0x0000023e5fdea800): JavaThread "C2 CompilerThread0" daemon [_thread_in_vm, id=7968, stack(0x000000171e100000,0x000000171e200000)]
Current CompileTask:
C2:480492748 232765 4 obClasses.oo.g$a::next (5 bytes)
Stack: [0x000000171e100000,0x000000171e200000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x645c0a]
V [jvm.dll+0x7d9fe9]
V [jvm.dll+0x7db6e9]
V [jvm.dll+0x7dbd87]
V [jvm.dll+0x2695ec]
V [jvm.dll+0x12d027]
V [jvm.dll+0x12d2b3]
V [jvm.dll+0x12ccfd]
V [jvm.dll+0x64b24e]
V [jvm.dll+0x221cac]
V [jvm.dll+0x220858]
V [jvm.dll+0x19e631]
V [jvm.dll+0x2306f9]
V [jvm.dll+0x22e86f]
V [jvm.dll+0x79b241]
V [jvm.dll+0x793f14]
V [jvm.dll+0x6449c5]
C [ucrtbase.dll+0x26b4c]
C [KERNEL32.DLL+0x14cb0]
C [ntdll.dll+0x7edcb]
I was unable to reproduce the issue. Simply getting the VM to compile the relevant function, by running a test and checking with -XX:+PrintCompilation what gets compiled, does not result in a crash.
I sadly can not share the actual code of the relevant function. Attached is some example code showing the structure of the surrounding code in the hope it might help. Although this example code also does not induce a crash.
---------- BEGIN SOURCE ----------
public class Test {
private transient Collection<Artifact> _artifacts;
public Iterable<Element> getElementsIterable() {
return () -> new ElementIterator(_artifacts);
}
private static class ElementIterator implements Iterator<Element> {
private Iterator<Artifact> _resultIterator = null;
private Artifact _nextResult = null;
public ElementIterator(Collection<Artifact> onlinecheckResults) {
_resultIterator = onlinecheckResults.iterator();
}
@Override
public boolean hasNext() {
while (_resultIterator.hasNext()) {
_nextResult = _resultIterator.next();
return true;
}
return false;
}
@Override
public Element next() { //Crash occurs compiling this function
if (_nextResult == null) {
throw new NoSuchElementException();
}
Factory factory = new Factory();
Parameter parameter = new Factory.Parameter(_nextResult._id);
return factory.createElement(parameter);
}
}
}
class Artifact {
String _id;
}
class Element {
String _id;
Element(String id) {
_id = id;
}
}
class Factory {
Element createElement(Parameter param) {
return new Element(param._id);
}
static class Parameter {
String _id;
Parameter(String id) {
_id = id;
}
}
}
---------- END SOURCE ----------
Windows Server 2022, OpenJDK 64-Bit Server VM Corretto-11.0.23.9.1
A DESCRIPTION OF THE PROBLEM :
We experienced multiple crashes on internal and customer systems with the same error when the VM attempted to compile the same function, see the shortended crash log below:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (buildOopMap.cpp:297), pid=8012, tid=7968
# guarantee(0) failed: must find derived/base pair
#
# JRE version: OpenJDK Runtime Environment Corretto-11.0.23.9.1 (11.0.23+9) (build 11.0.23+9-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-11.0.23.9.1 (11.0.23+9-LTS, mixed mode, tiered, parallel gc, windows-amd64)
#
# If you would like to submit a bug report, please visit:
# https://github.com/corretto/corretto-11/issues/
#
--------------- S U M M A R Y ------------
Command Line: -XX:+UseParallelGC -XX:+DisableExplicitGC -Xverify:none -XX:ReservedCodeCacheSize=2048m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -XX:StringTableSize=1500007 -DcheckCMCompatibilityComplete=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.util.zip.disableZip64ExtraFieldValidation=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED exit abort -Xms4096m -Xmx786432m -Xss512k
Host: Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz, 8 cores, 1023G, Windows Server 2022 , 64 bit Build 20348 (10.0.20348.3089)
--------------- T H R E A D ---------------
Current thread (0x0000023e5fdea800): JavaThread "C2 CompilerThread0" daemon [_thread_in_vm, id=7968, stack(0x000000171e100000,0x000000171e200000)]
Current CompileTask:
C2:480492748 232765 4 obClasses.oo.g$a::next (5 bytes)
Stack: [0x000000171e100000,0x000000171e200000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x645c0a]
V [jvm.dll+0x7d9fe9]
V [jvm.dll+0x7db6e9]
V [jvm.dll+0x7dbd87]
V [jvm.dll+0x2695ec]
V [jvm.dll+0x12d027]
V [jvm.dll+0x12d2b3]
V [jvm.dll+0x12ccfd]
V [jvm.dll+0x64b24e]
V [jvm.dll+0x221cac]
V [jvm.dll+0x220858]
V [jvm.dll+0x19e631]
V [jvm.dll+0x2306f9]
V [jvm.dll+0x22e86f]
V [jvm.dll+0x79b241]
V [jvm.dll+0x793f14]
V [jvm.dll+0x6449c5]
C [ucrtbase.dll+0x26b4c]
C [KERNEL32.DLL+0x14cb0]
C [ntdll.dll+0x7edcb]
I was unable to reproduce the issue. Simply getting the VM to compile the relevant function, by running a test and checking with -XX:+PrintCompilation what gets compiled, does not result in a crash.
I sadly can not share the actual code of the relevant function. Attached is some example code showing the structure of the surrounding code in the hope it might help. Although this example code also does not induce a crash.
---------- BEGIN SOURCE ----------
public class Test {
private transient Collection<Artifact> _artifacts;
public Iterable<Element> getElementsIterable() {
return () -> new ElementIterator(_artifacts);
}
private static class ElementIterator implements Iterator<Element> {
private Iterator<Artifact> _resultIterator = null;
private Artifact _nextResult = null;
public ElementIterator(Collection<Artifact> onlinecheckResults) {
_resultIterator = onlinecheckResults.iterator();
}
@Override
public boolean hasNext() {
while (_resultIterator.hasNext()) {
_nextResult = _resultIterator.next();
return true;
}
return false;
}
@Override
public Element next() { //Crash occurs compiling this function
if (_nextResult == null) {
throw new NoSuchElementException();
}
Factory factory = new Factory();
Parameter parameter = new Factory.Parameter(_nextResult._id);
return factory.createElement(parameter);
}
}
}
class Artifact {
String _id;
}
class Element {
String _id;
Element(String id) {
_id = id;
}
}
class Factory {
Element createElement(Parameter param) {
return new Element(param._id);
}
static class Parameter {
String _id;
Parameter(String id) {
_id = id;
}
}
}
---------- END SOURCE ----------