-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8352414: JFR: JavaMonitorDeflateEvent crashes when deflated monitor object is dead #24121
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
8352414: JFR: JavaMonitorDeflateEvent crashes when deflated monitor object is dead #24121
Conversation
|
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
|
@shipilev 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 67 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 |
Webrevs
|
dholmes-ora
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 fine to me.
Thanks
|
A event about a deflated monitor without any information which monitor is deflated seems just like noise to me. What problem are we trying to solve here again? Are we interested in how long a monitor was inflated? Pairing up inflates with deflates? Implementation wise, we should use monotonic, internally assigned ids as keys for monitor identity, instead of relying on the oops (but that is outside this PR). |
Yes, we want to pair inflates with deflates. When deflate happens on a dead object, we don't have a clear signal which object was deflated. But the event counts (and their timestamps) would still be matchable, and |
|
How do you match up the timestamps? Because without the oop, the connection between the two events is lost. Are we measuring how long time it takes to deflate a monitor? How useful is that information? Deflations can also happen asynchronously. If so, the thread information cannot be used to pair them up either. |
True, but even the timestamp+event is a useful bit of info. If there are X monitors recorded by stats event at 13:13, then 100+ inflations happened at 13:14, and then 50+ deflations happened at 13:15, then I can plausibly guess the momentary monitor population is X+50, even if deflation events gives me no precise mapping for dead objects was deflated.
It is useful to know when deflations happened, as this shows if deflater thread is actually performing well. We have seen "memory leaks" due to deflation policy bugs when monitor deflater was essentially stuck / outpaced by inflations. Pretty sure there are still lingering issues when monitor population spikes in a very short time frame, so it is useful to know inflations/deflations at individual events scale. |
|
Ok. We could devise a more stable scheme to retain the pairing in the future. |
|
Thanks! I gave it another spin through testing, and it still looks green. /integrate |
|
Going to push as commit 17dc30c.
Your commit was automatically rebased without conflicts. |
Little regression crept in with JDK-8351142: on the deflation path, object associated with monitor can be already dead.
A new stress test fails within seconds without a fix. It also covers other monitor events, so we have extra coverage there as well.
Additional testing:
jdk_jfrProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24121/head:pull/24121$ git checkout pull/24121Update a local copy of the PR:
$ git checkout pull/24121$ git pull https://git.openjdk.org/jdk.git pull/24121/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24121View PR using the GUI difftool:
$ git pr show -t 24121Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24121.diff
Using Webrev
Link to Webrev Comment