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:50:50 UTC 2025


On Thu, 16 Oct 2025 16:40:38 GMT, Chris Plummer <cjplummer 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.

Sorry, looks like I misread the diff and waitTimeout was already removed. WAIT_TIMEOUT and WAIT_DELTA still need removing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27840#discussion_r2436707826


More information about the serviceability-dev mailing list