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:24:29 UTC 2018


Thanks for your quick review, Ioi and Jiangli.

I'll also update the following comment in the script before push.
# Also we set the max metaspace to 16MB

thanks,
Calvin

On 8/28/18, 11:08 AM, Ioi Lam wrote:
> Looks good. Thanks!
>
> Ioi
>
>> On Aug 28, 2018, at 11:02 AM, Jiangli Zhou<jiangli.zhou at oracle.com>  wrote:
>>
>> The test change looks ok to me.
>>
>> Thanks,
>>
>> Jiangli
>>
>>
>>> 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.
>>>
>>> -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