RFR: 8373945: vmTestbase eatMemory/ClassUnloader provoke OOME to force GC and might cause GC in other threads [v8]
Chris Plummer
cjplummer at openjdk.org
Mon Dec 22 03:20:04 UTC 2025
On Sat, 20 Dec 2025 04:59:07 GMT, SendaoYan <syan at openjdk.org> wrote:
>> Hi all,
>>
>> This PR use `WhiteBox.getWhiteBox().fullGC()` instead of `eatMemory` to grigger full GC. The OOME trigger by `eatMemory` may cause vmTestbase/nsk/monitoring/stress/classload tests intermittent fails when run those tests simultancely on some machines. The WB.fullGC() might be use for same purpose. It also reduce test execution time.
>>
>> Change has been verified locally by running tests vmTestbase/nsk/monitoring/stress/classload on linux-x64.
>>
>> Additional testing:
>>
>> - [ ] All jtreg tests by fastdebug build
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>
> Update comments about "using memory stressing techique"
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large002/TestDescription.java line 52:
> 50: * The test loads the classes with nsk.share.gc.GCClassUnloader class that
> 51: * extends nsk.share. * The test loads the classes with nsk.share.gc.GCClassUnloader class.
> 52: * As soon as a class is loaded, the test creates an instance of
There seems to have been a copy-n-paste error here, and it was replicated in a few test cases below.
test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod003/TestDescription.java line 71:
> 69: * -transport.address=dynamic
> 70: * -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
> 71: * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI" ./bin
I think ./bin should be moved to a newline.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28891#discussion_r2638499254
PR Review Comment: https://git.openjdk.org/jdk/pull/28891#discussion_r2638506867
More information about the serviceability-dev
mailing list