On Thu, 16 Oct 2025 09:25:42 GMT, Albert Mingkun Yang <[email protected]> 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

Reply via email to