-
Bug
-
Resolution: Fixed
-
P4
-
19
-
b02
When running with -XX:+VerifyDuringGC G1 will do verification during the Remark and Cleanup pause. The "before" verification in Remark is causing class unloading to not work as expected because iterating over the CLDGs keeps all CLDs live. The call to ClassLoaderData::holder() in ClassLoaderDataGraphIterator::get_next() pushes it into the SATB queue, which is processed during Remark just a bit later.
At least for the TestHumongousClassLoader.java this causes a test failure as the CLDs are not unloaded. This can be reproduce using -XX:VerifySubSet=classloader_data_graph (i.e. only do that specific verification) and if you instead run with -XX:VerifySubSet=heap the tests passes.
One workaround could be to only verify the heap in the "before" verification for remark, exclude the CLDG verification in this verification or add a special iteration for this particular verification.
At least for the TestHumongousClassLoader.java this causes a test failure as the CLDs are not unloaded. This can be reproduce using -XX:VerifySubSet=classloader_data_graph (i.e. only do that specific verification) and if you instead run with -XX:VerifySubSet=heap the tests passes.
One workaround could be to only verify the heap in the "before" verification for remark, exclude the CLDG verification in this verification or add a special iteration for this particular verification.
- relates to
-
JDK-8288203 runtime/ClassUnload/UnloadTestWithVerifyDuringGC.java fails with release VMs
-
- Resolved
-
-
JDK-8297427 Avoid keeping class loaders alive when executing ClassLoaderStatsVMOperation
-
- Resolved
-
-
JDK-8326820 Metadata artificially kept alive
-
- Resolved
-
-
JDK-8335059 Consider renaming ClassLoaderData::keep_alive
-
- Resolved
-
(1 links to)