-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8265919: RunThese30M fails "assert((!(((((JfrTraceIdBits::load(value)) & ((1 << 4) << 8)) != 0))))) failed: invariant" #4583
Conversation
👋 Welcome back mgronlun! A progress list of the required criteria for merging this PR into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with removing the assert, given that it is unlikely to happen in production code, but I think we should try to fix it for JDK 18 (and possibly backport).
Starting up JFR is an expensive operation, in this case a second time, so It doesn't seem unreasonable to add some code to reset the state properly, even if it involves iterating all classes, introducing a safepoint or taking some lock.
@mgronlun This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
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 7 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Thanks Erik. I don't think there is anything to fix "properly". This is the state reset code that runs when JFR starts, JfrTypeSet::clear(). It is just that it built on an invalid assumption (that no class unload will happen in-between the last rotate() and end_recording()). |
/integrate |
Going to push as commit ffa34ed.
Your commit was automatically rebased without conflicts. |
Great! I got the impression in JIRA that it could result in a reference being null (in the file), but I may have misunderstood. |
Right. For product builds, the return (just after the assert), would have caused the serialized state not to be reset, because the expectation was that no artifacts would not have such a state. A non-cleared serialized state could cause the artifact to not be written to the constant pool correctly later, as it would be assumed to have been written already (has the serialized state bit set). The removal of the return lets the code fall-through for the serialized state bit(s) to be cleared explicitly. |
Greetings,
Please help review this small changeset to remove an invalid assertion; reasoning is summarized in the JIRA issue.
Testing: jdk_jfr
Thanks
Markus
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4583/head:pull/4583
$ git checkout pull/4583
Update a local copy of the PR:
$ git checkout pull/4583
$ git pull https://git.openjdk.java.net/jdk pull/4583/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4583
View PR using the GUI difftool:
$ git pr show -t 4583
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4583.diff