-
Notifications
You must be signed in to change notification settings - Fork 238
8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool #3012
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back dchuyko! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
This backport pull request has now been updated with the original issue, but not the original commit. If you have the original commit hash, please update the pull request title with |
|
/approval request This a tiny bugfix in ForkJoinPool. At one of code paths the TC subfield of ctl field is decremented and the result is not masked correctly, so the RC subfield is not preserved. That sometimes leads to a stopped pool in 17 and 11 [0]. Testing: full jtreg tier1-3 and JCK for multiple supported platforms in the internal Liberica CI. |
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.
Yes, this corrects i the same way as in other releases
This a backport of JDK-8351933 [0] (PR [1]) for 11u. At one of code paths the TC subfield of ctl field is decremented and the result is not masked correctly. The target code is in runWorker() instead of tryTrim()/awaitWork() and the surrounding code is different from the current master, as well as the original mask name. The core change is the same, candidate for CTL.compareAndSet is constructed using '(RC_MASK & c) | (TC_MASK & (c - TC_UNIT))' instead of '(UC_MASK & (c - TC_UNIT))' to correctly preserve the RC subfield.
[0] https://bugs.openjdk.org/browse/JDK-8351933
[1] openjdk/jdk#24034
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3012/head:pull/3012
$ git checkout pull/3012
Update a local copy of the PR:
$ git checkout pull/3012
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3012/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3012
View PR using the GUI difftool:
$ git pr show -t 3012
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3012.diff
Using Webrev
Link to Webrev Comment