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

8214427: probable bug in logic of ConcurrentHashMap.addCount() #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tianshuang
Copy link

@tianshuang tianshuang commented Mar 19, 2022

8214427: probable bug in logic of ConcurrentHashMap.addCount()

This backport fixes the problem that the MAX_RESIZERS control does not take effect when multi-threaded expansion in ConcurrentHashMap.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 reviewer)

Issue

  • JDK-8214427: probable bug in logic of ConcurrentHashMap.addCount()

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk8u-dev pull/18/head:pull/18
$ git checkout pull/18

Update a local copy of the PR:
$ git checkout pull/18
$ git pull https://git.openjdk.java.net/jdk8u-dev pull/18/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk8u-dev/pull/18.diff

@bridgekeeper bridgekeeper bot added the oca label Mar 19, 2022
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Mar 19, 2022

Hi @tianshuang, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user tianshuang" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk openjdk bot changed the title Backport 8846159987f902bb6e2b966eb4656da4b6d9469d 8214427: probable bug in logic of ConcurrentHashMap.addCount() Mar 19, 2022
@openjdk
Copy link

@openjdk openjdk bot commented Mar 19, 2022

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport label Mar 19, 2022
@tianshuang
Copy link
Author

@tianshuang tianshuang commented Mar 19, 2022

/signed

@bridgekeeper bridgekeeper bot added the oca-verify label Mar 19, 2022
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Mar 19, 2022

Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@bridgekeeper bridgekeeper bot removed oca oca-verify labels Apr 1, 2022
@openjdk openjdk bot added the rfr label Apr 1, 2022
@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 1, 2022

Webrevs

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 29, 2022

@tianshuang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@tianshuang
Copy link
Author

@tianshuang tianshuang commented May 5, 2022

waiting for reviewer's review...

Copy link
Member

@phohensee phohensee left a comment

Clean backport net of file location. Lgtm.

@openjdk
Copy link

@openjdk openjdk bot commented May 11, 2022

@tianshuang This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8214427: probable bug in logic of ConcurrentHashMap.addCount()

Reviewed-by: phh

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 48 new commits pushed to 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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@phohensee) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label May 11, 2022
@tianshuang
Copy link
Author

@tianshuang tianshuang commented May 12, 2022

/integrate

@openjdk openjdk bot added the sponsor label May 12, 2022
@openjdk
Copy link

@openjdk openjdk bot commented May 12, 2022

@tianshuang
Your change (at version 7658e30) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

@phohensee phohensee commented May 12, 2022

Passes java.util.concurrent jtreg tests and "make test" (tier1).

@phohensee
Copy link
Member

@phohensee phohensee commented May 12, 2022

I'll sponsor this backport. Waiting for maintainer approval (jdk8u-fix-yes tag). See https://wiki.openjdk.java.net/display/jdk8u/Main for details.

@jerboaa
Copy link
Contributor

@jerboaa jerboaa commented May 12, 2022

This is not in 11u as far as I can see. It should go there first before going into 8.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

I've opened a PR for the 11u backport: openjdk/jdk11u-dev#1114

Can you merge this with jdk8u-dev/master so that the full set of build checks run?

I've see some whitespace differences with the 8u version:

-+                        (nt = nextTable) == null || transferIndex <= 0)
++                            (nt = nextTable) == null || transferIndex <= 0)
-+                    transferIndex <= 0)
++                        transferIndex <= 0)

Do you see this locally or is it introduced by the webrev tool?

The change from compareAndSetInt to compareAndSwapInt looks correct to match the 8u version.

@gnu-andrew
Copy link
Member

@gnu-andrew gnu-andrew commented May 29, 2022

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Fix is in 11u: https://git.openjdk.java.net/jdk11u-dev/commit/a2e64948eb12089bd45c2b734c405ead87977276

Awaiting response to my previous comments and test runs.

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 1, 2022

@tianshuang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@tianshuang
Copy link
Author

@tianshuang tianshuang commented Jul 1, 2022

@jerboaa 11u now includes a backport of 8214427.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ready rfr sponsor
4 participants