-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8253902: G1: Starting a new marking cycle before the conc mark thread fully completed causes assertion failure #501
Conversation
👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into |
@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 more 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 20 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 |
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.
Thanks for your reviews @kimbarrett @kstefanj |
/integrate |
@tschatzl Since your change was applied there have been 32 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit c9d1dcc. 💡 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 benign race between giving the signal to start a new concurrent cycle and G1ConcurrentMarkThread waiting for that signal?
With the changes from JDK-8240556 there is a small window where after the concurrent mark thread sets itself to idle (at the end of the
while (wait_for_next_cycle())
loop inG1ConcurrentMarkThread::run_service()
), a GC pause may request a new gc, setting thein-progress
flag, and the concurrent mark thread waiting for a new cycle inwait_for_next_cycle()
where this assert fails.This ordering can be observed in the log message output:
Previously this problem with the assert did not occur because there has been another "pre-in-progress" state implemented in a somewhat complicated way with nested states. JDK-8240556 removed that one. The messages could be out of order before that change too.
The suggested fix is to remove this assert.
Testing: a few thousand times for that test (not to try to observe the assert which is gone now, but double-check if there is any deadlock etc hiding), tier1-5
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/501/head:pull/501
$ git checkout pull/501