JDK-8297427 : Avoid keeping class loaders alive when executing ClassLoaderStatsVMOperation
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-11-22
  • Updated: 2022-12-05
  • Resolved: 2022-12-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 masterFixed
Related Reports
Relates :  
Description
The ClassLoaderStatsVMOperation is run as its own VM operation calculating and printing stats for the present class loaders. Iterating through the class loaders keeps them alive and prior to concurrent class unloading in ZGC this was no problem. With ZGC this can generate issues if the ClassLoaderStatsVMOperation occurs while doing class unloading. Classes that are dead and could be unloaded can wrongfully be kept alive just because there was a statistics operation running at the same time.
Comments
Changeset: eea1a8a9 Author: Stefan Johansson <sjohanss@openjdk.org> Date: 2022-12-01 10:30:14 +0000 URL: https://git.openjdk.org/jdk/commit/eea1a8a95e172ef5221ab622d171f46cc6cbb598
01-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11300 Date: 2022-11-22 20:54:54 +0000
23-11-2022