Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8321698: JFR asserts in write_classloader: failed invariant #17177

wants to merge 3 commits into from


Copy link

@mgronlun mgronlun commented Dec 21, 2023


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



  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue


  • JDK-8321698: JFR asserts in write_classloader: failed invariant (Bug - P3)



Using git

Checkout this PR locally:
$ git fetch pull/17177/head:pull/17177
$ git checkout pull/17177

Update a local copy of the PR:
$ git checkout pull/17177
$ git pull pull/17177/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17177

View PR using the GUI difftool:
$ git pr show -t 17177

Using diff file

Download this PR as a diff file:


Link to Webrev Comment

Copy link

bridgekeeper bot commented Dec 21, 2023

👋 Welcome back mgronlun! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 21, 2023
Copy link

openjdk bot commented Dec 21, 2023

@mgronlun The following label will be automatically applied to this pull request:

  • hotspot-jfr

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-jfr label Dec 21, 2023
Copy link

mlbridge bot commented Dec 21, 2023


Copy link

openjdk bot commented Dec 21, 2023

@mgronlun This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8321698: JFR asserts in write_classloader: failed invariant

Reviewed-by: egahlin

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 87 new commits pushed to the master branch:

  • 1230853: 8322163: runtime/Unsafe/ fails on Alpine after JDK-8320886
  • dce7a57: 8321683: Tests fail with AssertionError in RangeWithPageSize
  • c53f845: 8322539: Parallel: Remove duplicated methods in PSAdaptiveSizePolicy
  • 84c2379: 8320139: [JVMCI] VmObjectAlloc is not generated by intrinsics methods which allocate objects
  • 3b908c4: 8319795: Static huge pages are not used for CodeCache
  • 1802601: 8293623: Simplify G1ConcurrentRefineThreadControl
  • 6de23bf: 8322418: Problem list gc/ subtests for 8298781
  • aff659a: 8322538: remove fatal from JVM_VirtualThread functions for !INCLUDE_JVMTI
  • 05745e3: 8319548: Unexpected internal name for Filler array klass causes error in VisualVM
  • e8768ae: 8321972: test runtime/Unsafe/ timeout on linux-riscv64 platform
  • ... and 77 more:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 21, 2023
@mgronlun mgronlun closed this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
hotspot-jfr ready Pull request is ready to be integrated rfr Pull request is ready for review
2 participants