RFR(XS): 8209743: [TESTBUG] java/lang/management/MemoryMXBean/LowMemoryTest2.sh fails with OutOfMemoryError running in CDS mode
Calvin Cheung
calvin.cheung at oracle.com
Tue Aug 28 17:54:13 UTC 2018
bug: https://bugs.openjdk.java.net/browse/JDK-8209743
The first 3 scenarios of the test failed with
"java.lang.OutOfMemoryError: Metaspace" when running with CDS archive.
A simple fix is to increase the MaxMetaspaceSize from 16m to 32m.
bash-4.2$ hg diff
test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
diff --git
a/test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
b/test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
--- a/test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
+++ b/test/jdk/java/lang/management/MemoryMXBean/LowMemoryTest2.sh
@@ -57,9 +57,9 @@
# Also we set the max metaspace to 16MB - otherwise the test takes too
# long to run.
-go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseSerialGC LowMemoryTest2
-go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParallelGC LowMemoryTest2
-go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseConcMarkSweepGC
LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=32m -XX:+UseSerialGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=32m -XX:+UseParallelGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=32m -XX:+UseConcMarkSweepGC
LowMemoryTest2
# Test class metaspace - might hit MaxMetaspaceSize instead if
# UseCompressedClassPointers is off or if 32 bit.
Tested on linux, solaris, and macosx with the same vmoptions as in
tier5. Also repeated the test 5 times on each platform.
thanks,
Calvin
More information about the hotspot-runtime-dev
mailing list