-
Bug
-
Resolution: Fixed
-
P2
-
11
-
master
Current tier1 tests in jdk-updates/jdk11u fail with OOMEs in langtools tests. Depending on configuration, ether 50+ tests are failing, or just one:
$ make images run-test TEST=jdk/internal/shellsupport/doc/JavadocHelperTest.java
<later in logs>
java.lang.OutOfMemoryError: Java heap space
at jdk.compiler/com.sun.tools.javac.util.ByteBuffer.<init>(ByteBuffer.java:59)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.<init>(ClassWriter.java:132)
The story for langtools test is complicated, and it changes between JDK releases, as build system evolves. There are "test" and "run-test" targets that exist in 11u, 12u, 13, sometimes aliased, sometimes deprecated.
In 11u, run-tests is the go-to way to execute tier1 tests. However, doing this would run with different heap sizes:
$ make images run-test TEST=jdk/internal/shellsupport/doc/JavadocHelperTest.java
jdk11u would run with -Xmx512m and OOME
jdk12u would run with -Xmx768m and complete fine
jdk would run with -Xmx768m and complete fine
The reason why 12+ runs fine isJDK-8212028, which did, among other things, this: "Langtools default memory size needs to be 768m". Backporting the entire JDK-8212028 would be burdensome, but we can at least fix the langtools test heap size for 11u with this patch:
diff -r 56d673a2ff47 make/RunTests.gmk
--- a/make/RunTests.gmk Wed Dec 05 17:33:01 2018 +0000
+++ b/make/RunTests.gmk Mon Feb 18 20:11:53 2019 +0100
@@ -163,10 +163,12 @@
jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
nashorn_JTREG_PROBLEM_LIST += $(TOPDIR)/test/nashorn/ProblemList.txt
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
+langtools_JTREG_MAX_MEM := 768m
+
################################################################################
# Parse test selection
#
# The user has given a test selection in the TEST variable. We must parse it
# and determine what that means in terms of actual calls to the test framework.
(Separately, we would need to limit the number of default test jobs withJDK-8219260)
$ make images run-test TEST=jdk/internal/shellsupport/doc/JavadocHelperTest.java
<later in logs>
java.lang.OutOfMemoryError: Java heap space
at jdk.compiler/com.sun.tools.javac.util.ByteBuffer.<init>(ByteBuffer.java:59)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.<init>(ClassWriter.java:132)
The story for langtools test is complicated, and it changes between JDK releases, as build system evolves. There are "test" and "run-test" targets that exist in 11u, 12u, 13, sometimes aliased, sometimes deprecated.
In 11u, run-tests is the go-to way to execute tier1 tests. However, doing this would run with different heap sizes:
$ make images run-test TEST=jdk/internal/shellsupport/doc/JavadocHelperTest.java
jdk11u would run with -Xmx512m and OOME
jdk12u would run with -Xmx768m and complete fine
jdk would run with -Xmx768m and complete fine
The reason why 12+ runs fine is
diff -r 56d673a2ff47 make/RunTests.gmk
--- a/make/RunTests.gmk Wed Dec 05 17:33:01 2018 +0000
+++ b/make/RunTests.gmk Mon Feb 18 20:11:53 2019 +0100
@@ -163,10 +163,12 @@
jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
nashorn_JTREG_PROBLEM_LIST += $(TOPDIR)/test/nashorn/ProblemList.txt
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
+langtools_JTREG_MAX_MEM := 768m
+
################################################################################
# Parse test selection
#
# The user has given a test selection in the TEST variable. We must parse it
# and determine what that means in terms of actual calls to the test framework.
(Separately, we would need to limit the number of default test jobs with
- relates to
-
JDK-8214003 Limit default test jobs based on memory size
-
- Resolved
-
-
JDK-8219260 Default number of test jobs needs to be consistently calculated
-
- Resolved
-
-
JDK-8212028 Use run-test makefile framework for testing in Oracle's Mach5
-
- Resolved
-