RFR: 8321698: JFR asserts in write_classloader: failed invariant [v2]

Erik Gahlin egahlin at openjdk.org
Thu Dec 21 19:23:49 UTC 2023


On Thu, 21 Dec 2023 18:18:48 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> Greetings,
>> 
>> I have reviewed the JFR tagging mechanism, which lacks proper transitivity in certain situations. For example, when tagging a PackageEntry or a ModuleEntry, no tag information is set for the ModuleEntry's CLD and its class_loader_klass. The assert then fires when writing the CLD of a ModuleEntry, should its CLD not have been tagged by some other means (some other direct usage).
>> 
>> The tagging must, in general, become deeper than what is done today, i.e. it must cover the transitive closure of a Klass, which involves two branches:
>> 
>> 1) Klass -> CLD -> class_loader_klass
>> 2) Klass -> PackageEntry -> ModuleEntry -> CLD -> class_loader_klass
>> 
>> A Klass under its closure can be treated as a node in a binary tree. Its closure (subtree) is covered by writing and tagging of artifacts using preorder traversal by recursing its CLD klasses.
>> 
>> Testing: jdk_jfr, stress testing
>> 
>> Thanks
>> Markus
>
> Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
> 
>   conditional method assert

Marked as reviewed by egahlin (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/17177#pullrequestreview-1793541349


More information about the hotspot-jfr-dev mailing list