Skip to content
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

8271163: G1 uses wrong degree of MT processing since JDK-8270169 #4888

Closed

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Jul 23, 2021

Hi all,

JDK-8270169 changed the amount of resources supplied by the CM reference processor, assuming that the CM ref processor is only ever used with the marking threads.
This is unfortunately not true, the CM reference processor is also used by the Remark pause for discovery using the parallel gc worker threads.

This causes crashes because of the code assuming single threaded operation while it is not.

The solution proposed here is to just revert JDK-8270169 which introduced that change. Applies cleanly.

I also added a comment in the reference processor constructor to why we need to consider both thread counts.

Thanks,
Thomas


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8271163: G1 uses wrong degree of MT processing since JDK-8270169

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4888/head:pull/4888
$ git checkout pull/4888

Update a local copy of the PR:
$ git checkout pull/4888
$ git pull https://git.openjdk.java.net/jdk pull/4888/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4888

View PR using the GUI difftool:
$ git pr show -t 4888

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4888.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 23, 2021

👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

@openjdk openjdk bot commented Jul 23, 2021

@tschatzl The following label will be automatically applied to this pull request:

  • hotspot-gc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-gc label Jul 23, 2021
@tschatzl tschatzl force-pushed the submit/8271163-crash-cm-ref-mt-ness branch from 30c92b0 to c7628e6 Compare Jul 23, 2021
@tschatzl tschatzl marked this pull request as ready for review Jul 23, 2021
@openjdk openjdk bot added the rfr label Jul 23, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jul 23, 2021

Webrevs

@tschatzl tschatzl force-pushed the submit/8271163-crash-cm-ref-mt-ness branch from c7628e6 to 04e043a Compare Jul 23, 2021
Copy link

@kimbarrett kimbarrett left a comment

Looks good.

@openjdk
Copy link

@openjdk openjdk bot commented Jul 23, 2021

@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:

8271163: G1 uses wrong degree of MT processing since JDK-8270169

Reviewed-by: kbarrett, ayang

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 2 new commits pushed to the master branch:

  • 8a789b7: 8263840: PeriodicTask should declare its destructor virtual
  • f226190: 8270894: Use acquire semantics in ObjectSynchronizer::read_stable_mark()

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jul 23, 2021
@kimbarrett
Copy link

@kimbarrett kimbarrett commented Jul 23, 2021

As this is a simple backout (plus commentary), I suggest not waiting the usual 24 hours before pushing, to reduce testing noise.

@tschatzl
Copy link
Contributor Author

@tschatzl tschatzl commented Jul 23, 2021

Since this is basically a clean backout of JDK-8270169, I'll skip the 24h rule requirement.

Thanks @kimbarrett @albertnetymk for your reviews.

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Jul 23, 2021

Going to push as commit 8c8e3a0.
Since your change was applied there have been 2 commits pushed to the master branch:

  • 8a789b7: 8263840: PeriodicTask should declare its destructor virtual
  • f226190: 8270894: Use acquire semantics in ObjectSynchronizer::read_stable_mark()

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jul 23, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jul 23, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 23, 2021

@tschatzl Pushed as commit 8c8e3a0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@tschatzl tschatzl deleted the submit/8271163-crash-cm-ref-mt-ness branch Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc integrated
3 participants