-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8298371: monitors_on_stack extracts unprocessed oops #11582
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
Conversation
|
👋 Welcome back stefank! A progress list of the required criteria for merging this PR into |
pchilano
left a comment
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.
Looks good. Although I think I would rather avoid the possible hiding of bugs in debug builds issue. Maybe better instead of just removing it completely would be to move the assert after the flush_stack_processing() call which already processes the frames anyways. That would cover the successful freeze cases but not the pinned ones.
Another possibility would be for monitors_on_stack() to just return the same expected held_monitor_count() for ZGC, i.e. skip it. If we have a locking mismatch bug it would likely be independent of which GC we are using so we would still be checking it for the other GCs.
|
@stefank 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 88 new commits pushed to the
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 |
|
Monitor counting is always on, regardless of preview enabled or not. I don't see this assert covering more cases than the assert in JavaThread::exit(). (which always checked, regardless of preview enabled or not) So I really think we can remove this assert. But if you just want to fix the bug that is fine. |
|
Thanks for the reviews and feedback. In interest of getting this done, I'm going to push this as is, but I'll open an RFE for RT to consider your suggestions. |
|
I've created https://bugs.openjdk.org/browse/JDK-8298733 to track the future of the monitors_on_stack assert. |
|
/integrate |
|
Going to push as commit b754aa5.
Your commit was automatically rebased without conflicts. |
|
/backport jdk20 |
|
@stefank the backport was successfully created on the branch stefank-backport-b754aa5e in my personal fork of openjdk/jdk20. To create a pull request with this backport targeting openjdk/jdk20:master, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk20: |
Thank you! |
While investigating JDK-8298058 we've found that monitors_on_stack extracts oops without setting up the RegisterMap to process oops. This then leaks out stale oops.
A simple fix is to change the RegisterMap to perform oops processing. However, monitors_on_stack is only used in an assert, so this means that we'll get a difference in behavior between release builds and debug builds. This has the potential to hide bugs in debug builds. It has been suggested to me that it might be better to simply remove the assert:
The suggested patch just turns on processing, but I'm also fine with removing the assert if that seems to be a better solution.
Tested with reproducer using Fuzz.java + ZGC
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11582/head:pull/11582$ git checkout pull/11582Update a local copy of the PR:
$ git checkout pull/11582$ git pull https://git.openjdk.org/jdk pull/11582/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11582View PR using the GUI difftool:
$ git pr show -t 11582Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11582.diff