RFR: 8289257: Some custom loader tests failed due to symbol refcount not decremented

Calvin Cheung ccheung at openjdk.org
Thu Jun 30 22:47:04 UTC 2022


Removing the test for class loader name symbol refcount since similar test exists in runtime/ClassUnload/UnloadTest.java.

Tested locally on linux-x64 with ZGC. Running more tests via mach5.

An alternative approach would be adding a `WB.fullGC()` call after `ClassUnloadCommon.triggerUnloading()` as follows:


--- a/test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes/HelloUnload.java
+++ b/test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes/HelloUnload.java
@@ -105,6 +105,7 @@ public class HelloUnload {
 
             urlClassLoader = null; c = null; o = null;
             ClassUnloadCommon.triggerUnloading();
+            wb.fullGC();
             System.out.println("Is CustomLoadee alive? " + wb.isClassAlive(className));
             ClassUnloadCommon.failIf(wb.isClassAlive(className), "should have been unloaded");

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

Commit messages:
 - update ProblemList-zgc.txt
 - 8289257: Some custom loader tests failed due to symbol refcount not decremented

Changes: https://git.openjdk.org/jdk/pull/9340/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9340&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8289257
  Stats: 14 lines in 2 files changed: 0 ins; 14 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/9340.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9340/head:pull/9340

PR: https://git.openjdk.org/jdk/pull/9340


More information about the hotspot-runtime-dev mailing list