RFR: 8226236: [TESTBUG] win32: gc/metaspace/TestCapacityUntilGCWrapAround.java fails

Yasumasa Suenaga ysuenaga at openjdk.java.net
Tue Oct 13 13:05:20 UTC 2020


On Tue, 13 Oct 2020 10:12:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Originally filed at AdoptOpenJDK:
>> https://github.com/AdoptOpenJDK/openjdk-tests/issues/1162
>> 
>> The test fails on 32bit windows with:
>> 
>> java.lang.IllegalStateException: WB_IncMetaspaceCapacityUntilGC: could not increase capacity until GC due to contention
>> with another thread
>>         at sun.hotspot.WhiteBox.incMetaspaceCapacityUntilGC(Native Method)
>>         at TestCapacityUntilGCWrapAround.main(TestCapacityUntilGCWrapAround.java:51)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:498)
>>         at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
>>         at java.lang.Thread.run(Thread.java:748)
>> 
>> `TestCapacityUntilGCWrapAround` passes `4GB - 1` to `incMetaspaceCapacityUntilGC()`. It seems to be too big.
>> And also this code seems to want to check the behavior when `_capacity_until_gc` is overflown. White box test would
>> throw ISE when it hapen. So we need to handle it correctly.
>
> Current patch makes `gc/metaspace` tests pass on `x86_32` for me. They used to fail as described.

Thanks @shipilev ! Can you approve this change?

-------------

PR: https://git.openjdk.java.net/jdk/pull/628



More information about the hotspot-gc-dev mailing list