[jdk17u-dev] RFR: 8256811: Delayed/missed jdwp class unloading events [v4]

Andrew Dinn adinn at openjdk.org
Thu Oct 27 13:17:13 UTC 2022


On Wed, 7 Sep 2022 09:54:02 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> Backport of patch to fix class unloading event notification.
>> 
>> This backport was originally developed by @zhengyu123 and involved some minor changes to the original patch.
>> 
>> n.b. the original patch required a follow up fix (cf JDK-8290908) which also needs backporting after this has been included.
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   correct type

Fix Request

The failure to correctly report class unloading events both in the OpenJDK tests and in actual deployments is causing spurious failures for the eclipse team's testing regime. This initial patch and the follow up patches mentioned above were adopted as remedies in upstream releases. Although they are still only an ad hoc fix, do in practice avoid the OpenJDK test failures and should produce the same results for other users.

Some of the upstream patches were superseded by later ones in order to arrive at a satisfactory solution. However, rather than create a new patch to arrive at the same end result it seems best to backport them all in sequence. They all apply cleanly apart from the first one.

One patch merely enables debug output in a relevant test. That has been retained, 1) to maintain patch compatibility with upstream, 2) to ensure follow-on patches apply cleanly, 3) because it will be useful if the ad hoc nature of the current fixes means further problems are encountered and 4) because its effect is minimal, being local only to the test and only resulting in a small amount more info in the test output file.

The overall risk is low because these patches only modify the class unloading code.

The changes have been tested by running the relevant class unloading unit tests. This does not guarantee the problem is fixed (because it is intermittent). However, it does indicate that the patches are not flawed.

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

PR: https://git.openjdk.org/jdk17u-dev/pull/635


More information about the jdk-updates-dev mailing list