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 18:34:02 UTC 2018



On 8/28/18, 11:25 AM, mandy chung wrote:
>
>
> On 8/28/18 10:54 AM, Calvin Cheung wrote:
>> 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.
>>
>
> How long does this test run with this patch?  fastdebug build.
With fastdebug and CDS archive:
solaris/sparcv9    12s - 27s
linux-x64            6s - 13s
macosx                6s - 11s

> Is the above comment still valid?

I'll update comment before push.
How about the following comment?

# Also we set the max metaspace to 16MB/32MB - otherwise the test takes too
# long to run. The 32MB setting is required for running with CDS archive.

thanks,
Calvin

>
> Mandy
>
>> -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