RFR: 8293282: LoadLibraryUnloadTest.java fails with "Too few cleared WeakReferences"
Roger Riggs
rriggs at openjdk.org
Fri Sep 9 15:15:39 UTC 2022
On Thu, 8 Sep 2022 20:26:41 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> Modify the LoadLibraryUnload test to call gc() more a few times, allowing multiple gc cycles to queue the expected refs.
> Short the timeout on each cycle to 10 sec.
Hi Jai, I don't think the memory size comes into play, the GC is invoked directly and WeakReferences should be cleared independently from memory pressure. Adding a memory max might be harmless, but it would not be clear whether it was really a factor.
As for the -Xcheck:jni, it's a left over from when the test was constructed and run as a single main.
There is no explicit JNI usage in the test and the test logic does not depend on that setting.
It should be removed to avoid future confusion. Thanks for the observations.
-------------
PR: https://git.openjdk.org/jdk/pull/10223
More information about the core-libs-dev
mailing list