Skip to content

8386085: Livelock in AbstractQueuedSynchronizer.cleanQueue() when multiple threads do tryAcquire() with a short timeout and no permits available - #214

Open
kirill-shirokov wants to merge 1 commit into
openjdk:masterfrom
kirill-shirokov:8386085-backport

Conversation

@kirill-shirokov

@kirill-shirokov kirill-shirokov commented Jun 19, 2026

Copy link
Copy Markdown
Member

Testing done:



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8386085 needs maintainer approval

Issue

  • JDK-8386085: Livelock in AbstractQueuedSynchronizer.cleanQueue() when multiple threads do tryAcquire() with a short timeout and no permits available (Bug - P3 - Requested)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk26u.git pull/214/head:pull/214
$ git checkout pull/214

Update a local copy of the PR:
$ git checkout pull/214
$ git pull https://git.openjdk.org/jdk26u.git pull/214/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 214

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk26u/pull/214.diff

Using Webrev

Link to Webrev Comment

…iple threads do tryAcquire() with a short timeout and no permits available

Reviewed-by: dl, alanb
@bridgekeeper

bridgekeeper Bot commented Jun 19, 2026

Copy link
Copy Markdown

👋 Welcome back kshiroko! 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

openjdk Bot commented Jun 19, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title Backport 7644d4afd437b64674a86012ab65dd0c9861cafe 8386085: Livelock in AbstractQueuedSyncronizer.cleanQueue() when multiple threads do tryAcquire() with a short timeout and no permits available Jun 19, 2026
@openjdk

openjdk Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

@openjdk openjdk Bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Jun 19, 2026
@openjdk

openjdk Bot commented Jun 19, 2026

Copy link
Copy Markdown

⚠️ @kirill-shirokov This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 19, 2026
@mlbridge

mlbridge Bot commented Jun 19, 2026

Copy link
Copy Markdown

Webrevs

@kirill-shirokov

Copy link
Copy Markdown
Member Author

All windows failures are due to environment, not related to the JDK (it could not install VS)

@kirill-shirokov

Copy link
Copy Markdown
Member Author

/approval request This PR fixes a long-standing bug in java.util.concurrent which leads to a livelock in all participating threads with 100% CPU consumption. Tested with reproducer and j.u.c. test on major platforms and CPUs.

@openjdk

openjdk Bot commented Jun 19, 2026

Copy link
Copy Markdown

@kirill-shirokov
8386085: The approval request has been created successfully.

@bridgekeeper

bridgekeeper Bot commented Jul 18, 2026

Copy link
Copy Markdown

@kirill-shirokov 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 /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper

bridgekeeper Bot commented Aug 15, 2026

Copy link
Copy Markdown

@kirill-shirokov This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper Bot closed this Aug 15, 2026
@kirill-shirokov

Copy link
Copy Markdown
Member Author

/open

@openjdk openjdk Bot reopened this Sep 3, 2026
@openjdk

openjdk Bot commented Sep 3, 2026

Copy link
Copy Markdown

@kirill-shirokov This pull request is now open

@openjdk openjdk Bot removed the approval Requires approval; will be removed when approval is received label Sep 3, 2026
@kirill-shirokov

Copy link
Copy Markdown
Member Author

/approval request The fix has been integrated into tip and jdk27 (openjdk/jdk#31595), can we proceed with integrating to the lower versions (17, 21, 25, 26)?

@kirill-shirokov kirill-shirokov changed the title 8386085: Livelock in AbstractQueuedSyncronizer.cleanQueue() when multiple threads do tryAcquire() with a short timeout and no permits available 8386085: Livelock in AbstractQueuedSynchronizer.cleanQueue() when multiple threads do tryAcquire() with a short timeout and no permits available Sep 3, 2026
@openjdk

openjdk Bot commented Sep 3, 2026

Copy link
Copy Markdown

@kirill-shirokov
8386085: The approval request has been updated successfully.

@openjdk openjdk Bot added the approval Requires approval; will be removed when approval is received label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant