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

8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin #451

Conversation

reinrich
Copy link
Member

@reinrich reinrich commented Apr 4, 2024

Hi,

this PR contains a backport of commit openjdk/jdk@4018b2b.

I'd like to do the backport because jdk 21 is affected by the issue. The included test hangs without the change.
Besides it will reduce the noise in jck tests we're doing regularily (the test api/java_net/ServerSocket/AcceptInterruptibleTests_PlatformThreads fails sometimes because of the issue).

The original fix does not apply due to renamig of a local variable. Also the context differs because there's no postInterrupt method to be called.
Nevertheless I'd consider the risk low because of the small size of the fix.

Tested with the included test.

The fix passed our CI testing: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. JCK, SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests (also with ParallelGC).
Testing was done with fastdebug builds on the main platforms and also on Linux/PPC64le.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8323782 needs maintainer approval

Issue

  • JDK-8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/451/head:pull/451
$ git checkout pull/451

Update a local copy of the PR:
$ git checkout pull/451
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/451/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 451

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/451.diff

Webrev

Link to Webrev Comment

Co-authored-by: Alan Bateman <alanb@openjdk.org>
Reviewed-by: alanb, dholmes
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 4, 2024

👋 Welcome back rrich! 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 bot commented Apr 4, 2024

❗ 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 4018b2b19629ddb8cd7a56e064dfef371f23e5fa 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin Apr 4, 2024
@openjdk
Copy link

openjdk bot commented Apr 4, 2024

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

@openjdk openjdk bot added the backport label Apr 4, 2024
@reinrich reinrich marked this pull request as ready for review April 5, 2024 14:36
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 5, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 5, 2024

Webrevs

@reinrich
Copy link
Member Author

reinrich commented Apr 5, 2024

I'll switch this back to draft in order to do the jdk 22 backport first.

@reinrich reinrich marked this pull request as draft April 5, 2024 15:51
@openjdk openjdk bot removed the rfr Pull request is ready for review label Apr 5, 2024
@reinrich
Copy link
Member Author

reinrich commented Apr 8, 2024

Closing because I want to do the 22u backport first

@reinrich reinrich closed this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant