RFR: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin [v3]

Richard Reingruber rrich at openjdk.org
Mon Feb 5 09:06:24 UTC 2024


> Set `interrupted` in `Thread::interrupt` before reading `nioBlocker` for correct (Dekker scheme) synchronization with concurrent execution of [`AbstractInterruptibleChannel::begin`](https://github.com/openjdk/jdk/blob/59062402b9c5ed5612a13c1c40eb22cf1b97c41a/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java#L176).
> 
> The change passed our CI functional testing: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests.
> Testing was done with fastdebug and release builds on the main platforms and also on Linux/PPC64le and AIX.

Richard Reingruber has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:

 - Merge branch 'master' into 8323782__Race__Thread__interrupt_vs__AbstractInterruptibleChannel_begin
 - Review Alan
 - New version of LotsOfInterrupts.java supporting virtual threads
 - Add Alan's LotsOfInterrupts.java test
 - Must checkAccess before changing interrupt state of other thread
 - 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/17444/files
  - new: https://git.openjdk.org/jdk/pull/17444/files/ab3513c1..81a9f812

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17444&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17444&range=01-02

  Stats: 32138 lines in 1713 files changed: 15466 ins; 4449 del; 12223 mod
  Patch: https://git.openjdk.org/jdk/pull/17444.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17444/head:pull/17444

PR: https://git.openjdk.org/jdk/pull/17444


More information about the core-libs-dev mailing list