RFR (XS) 8217471: [TESTBUG] gc/epsilon/TestClasses.java fails on some platforms - OOME Metaspace

Aleksey Shipilev shade at redhat.com
Thu Jan 24 11:44:20 UTC 2019


Bug:
  https://bugs.openjdk.java.net/browse/JDK-8217471

Newly added test limits max metaspace size to 32M and then allocates lots of classes. Turns out,
some machines just barely do not fit that limit. Many thanks to David Holmes for testing the change
on the offending Solaris box. I also used the more aggressive options on x86_64 (e.g. -Xcomp lines
provided by Mikael) to reproduce and test it locally. It seems the next step, 64M fits broken
configurations well.

Fix:

diff -r 091ed8f2e7d7 test/hotspot/jtreg/gc/epsilon/TestClasses.java
--- a/test/hotspot/jtreg/gc/epsilon/TestClasses.java    Thu Jan 24 12:45:19 2019 +0530
+++ b/test/hotspot/jtreg/gc/epsilon/TestClasses.java    Thu Jan 24 12:41:42 2019 +0100
@@ -28,11 +28,11 @@
  * @summary Epsilon is able to allocate a lot of classes
  *
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *
- * @run main/othervm -Xmx128m -XX:MetaspaceSize=1m -XX:MaxMetaspaceSize=32m
-XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -Xlog:gc+metaspace TestClasses
+ * @run main/othervm -Xmx128m -XX:MetaspaceSize=1m -XX:MaxMetaspaceSize=64m
-XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -Xlog:gc+metaspace TestClasses
  */

 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.Opcodes;


Testing: Linux x86_64 gc/epsilon, jdk-submit (running)

Thanks,
-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190124/d00ec578/signature.asc>


More information about the hotspot-gc-dev mailing list