[jdk17u-dev] RFR: 8306929: Avoid CleanClassLoaderDataMetaspaces safepoints when previous versions are shared

Oli Gillespie ogillespie at openjdk.org
Fri Aug 2 15:58:32 UTC 2024


On Fri, 2 Aug 2024 13:20:38 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:

> Hi all,
> 
> This pull request contains a backport of commit [408cec51](https://github.com/openjdk/jdk/commit/408cec516bb5fd82fb6dcddeee934ac0c5ecffaf) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.
> 
> The commit being backported was authored by Stefan Johansson on 4 May 2023 and was reviewed by Coleen Phillimore and Serguei Spitsyn.
> 
> It's clean except for the surrounding context changing between NULL and nullptr which was trivial to resolve. It comes with its own test, but I also confirmed that it fixes the reproducer shared on the issue.
> 
> Thanks!

Hmm, the new test is failing on Windows.


[1.056s][trace][redefine,class,iklass,add] adding previous version ref for java.lang.Error, EMCP_cnt=0
[1.056s][trace][redefine,class,iklass,add] scratch class not added; no methods are running
[1.271s][info ][jfr,startup              ] Started recording 1. No limit specified, using maxsize=250MB as default.
[1.271s][info ][jfr,startup              ] 
[1.271s][info ][jfr,startup              ] Use jcmd 2540 JFR.dump name=1 filename=FILEPATH to copy recording data to file.
[1.371s][trace][redefine,class,iklass,purge] Class unloading: should_clean_previous_versions = false


is happening for `-Xshare:off` instead of the expected


scratch class added; one of its methods is on_stack.
Class unloading: should_clean_previous_versions = true


Will try to investigate. @kstefanj if you happen to know why this might happen please let me know.

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2776#issuecomment-2265696431


More information about the jdk-updates-dev mailing list