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

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


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.

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

Commit messages:
 - 8226236: [TESTBUG] win32: gc/metaspace/TestCapacityUntilGCWrapAround.java fails

Changes: https://git.openjdk.java.net/jdk/pull/628/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=628&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8226236
  Stats: 36 lines in 2 files changed: 17 ins; 12 del; 7 mod
  Patch: https://git.openjdk.java.net/jdk/pull/628.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/628/head:pull/628

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



More information about the hotspot-gc-dev mailing list