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
8254164: G1 only removes self forwarding pointers for last collection set increment #556
8254164: G1 only removes self forwarding pointers for last collection set increment #556
Conversation
👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
Nice work tracking this one down Thomas. The fix looks good, just a small thing about the comment.
// We need to check all regions whether they need self forward removals, not only | ||
// the last collection set increment. Reference processing may copy over and fail | ||
// evacuation in any region in the collection set. |
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 think your explanation in the summary is very clear and it would be nice to capture it in the comment as well. Maybe something like:
// We need to check all regions whether they need self forward removals, not only | |
// the last collection set increment. Reference processing may copy over and fail | |
// evacuation in any region in the collection set. | |
// We need to check all regions whether they need self forward removals, not only | |
// the last collection set increment. The reason is that reference processing (e.g. | |
// finalizers) can make it necessary to resurrect an otherwise unreachable object at | |
// the very end of the collection. The resurrected object might be located in a region | |
// evacuated in an earlier increment, but copying it at the end of the collection can | |
// trigger an evacuation failure. |
@tschatzl 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 32 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 |
Mailing list message from Thomas Schatzl on hotspot-gc-dev: Hi StefanJ, On 08.10.20 21:15, Stefan Johansson wrote:
[...]
thanks for your review. I updated the comment with a slightly Thanks, |
This is great, thanks Thomas. |
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. Well, as good as it can, given finalizers are still with us.
:) Thanks @kimbarrett @kstefanj for your reviews. /integrate |
@tschatzl Since your change was applied there have been 46 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 59378a1. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi all,
can I have reviews for this change that fixes a previously hard to reproduce crash that started showing up much more frequently in conjunction with changes to young gen sizing (JDK-8244603)?
The issues is that the code to process regions where evacuation failed only processes the last increment. This leaves forwarded pointers in the mark word of some objects. Obviously other code does not like that, e.g. the crashes in JDK-8248438 which I plan to close as duplicate.
Only checking the last collection set increment for regions that failed evacuation is wrong in case there is an evacuation failure caused by reference processing in a region that has been evacuated in earlier evacuation increments. Reference processing (e.g. finalizers) can make it necessary to resurrect an otherwise unreachable object at the very end of the collection that can't be copied and is located in a region evacuated in an earlier increment.
This optimization to only look at the last increment for removal of self forwarding pointers has been introduced in JDK-8218668.
Until changes to young gen sizing in JDK-8244603 this crashes has been a very rare occurrence, but with that it has been common in some tier8 tests (KitchenSink8/24h, DaCapo24h) particularly with some additional targeted verification (enable verification only at the end of mixed gcs with optional evacuation). Without this fix both tests fail within 10 minutes to 2 hours. With the patch everything completes fine.
Testing:
Note: since this change strictly does more work during evacuation failure handling I consider this amount of testing sufficient, i.e. with JDK-8244603. It is very hard to reproduce without JDK-8244603.
Progress
Testing
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/556/head:pull/556
$ git checkout pull/556