-
Notifications
You must be signed in to change notification settings - Fork 223
8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool #3354
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 in the same way as in other releases
@dchuyko 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 issue a |
/keepalive |
@dchuyko The pull request is being re-evaluated and the inactivity timeout has been reset. |
This a backport of JDK-8351933 [0] (PR [1]) for 17u. At one of code paths the TC subfield of ctl field is decremented and the result is not masked correctly. As a result, the FJP may stop executing tasks [2]. The target code is in awaitWork() instead of tryTrim() 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 compareAndSetCtl() is constructed using '(c & RC_MASK) | ((c - TC_UNIT) & TC_MASK)' 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
[2] https://bugs.openjdk.org/browse/JDK-8330017
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3354/head:pull/3354
$ git checkout pull/3354
Update a local copy of the PR:
$ git checkout pull/3354
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3354/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3354
View PR using the GUI difftool:
$ git pr show -t 3354
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3354.diff
Using Webrev
Link to Webrev Comment