Hi Serguei, On 64 bit machines Java fails to initialize a VM and prints " MaxMetaspaceSize is too small." diagnostic if the max metaspace size set to 8MB or less (java -XX:MaxMetaspaceSize=8m)
Per open/src/hotspot/share/memory/metaspace.cpp (line 1140) and open/src/hotspot/share/runtime/globals.hpp (line 1059) MaxMetaspaceSize on 64 bit machines should be greater than 8MB. Comparing it to the behavior of Java 8 it seems as these settings were increased since Java 8 where the metaspace size should be greater than 4MB only. cat -n open/src/hotspot/share/memory/metaspace.cpp 880 881 #define VIRTUALSPACEMULTIPLIER 2 882 1135 // Initial virtual space size will be calculated at global_initialize() 1136 size_t min_metaspace_sz = 1137 VIRTUALSPACEMULTIPLIER * InitialBootClassLoaderMetaspaceSize; 1138 if (UseCompressedClassPointers) { 1139 if ((min_metaspace_sz + CompressedClassSpaceSize) > MaxMetaspaceSize) { 1140 if (min_metaspace_sz >= MaxMetaspaceSize) { 1141 vm_exit_during_initialization("MaxMetaspaceSize is too small."); 1142 } else { 1143 FLAG_SET_ERGO(size_t, CompressedClassSpaceSize, 1144 MaxMetaspaceSize - min_metaspace_sz); 1145 } 1146 } cat -n open/src/hotspot/share/runtime/globals.hpp 1058 product(size_t, InitialBootClassLoaderMetaspaceSize, \ 1059 NOT_LP64(2200*K) LP64_ONLY(4*M), \ 1060 "Initial size of the boot class loader data metaspace") \ 1061 range(30*K, max_uintx/BytesPerWord) \ 1062 constraint(InitialBootClassLoaderMetaspaceSizeConstraintFunc, AfterErgo)\ Best regards, Daniil On 7/25/18, 4:32 PM, "serguei.spit...@oracle.com" <serguei.spit...@oracle.com> wrote: Hi Daniil, It looks good to me. What is the need to increase the metaspace size? Thanks, Serguei On 7/25/18 16:11, Daniil Titov wrote: > Hello, > > Please review the change that fix the test issue. The fix increases the metaspace size and corrects the path to the class files. > > Webrev: http://cr.openjdk.java.net/~dtitov/8207364/webrev.01/ > Issue: https://bugs.openjdk.java.net/browse/JDK-8207364 > > Thanks! > > Best regards, > Daniil > > >