RFR: 8342659: Test vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java failed: Class nsk.share.jdi.TestClass1 was not unloaded
Chris Plummer
cjplummer at openjdk.org
Thu Oct 16 16:43:16 UTC 2025
On Thu, 16 Oct 2025 09:25:42 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Use `Reference.refersTo` API to get more up to date liveness info of a class after OOM is thrown. The approach of relying `Cleaner` thread can incur some "asynchronous" cause various retrying logic, complicating the flow.
>
> The failure rate is ~60% before the fix and no failure for 2000 runs.
>
> Test: tier1-5
test/hotspot/jtreg/vmTestbase/nsk/share/ClassUnloader.java line 250:
> 248:
> 249: // free references to class and class loader to be able for collecting by GC
> 250: long waitTimeout = (customClassLoader == null) ? 0 : WAIT_TIMEOUT;
waitTimeout is no longer needed. You can also remove WAIT_TIMEOUT and WAIT_DELTA.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27840#discussion_r2436689604
More information about the serviceability-dev
mailing list