Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8329190

(ch) DatagramChannel.receive should throw ClosedChannelException when called on closed channel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 11, 23
    • core-libs
    • b19
    • Verified

      https://bugs.openjdk.org/browse/JDK-8327650 addresses a jtreg timeout failure in java/nio/channels/DatagramChannel/StressNativeSignal.java due to a race condition. This failure highlighted an anomaly in the specific Exceptions thrown due to an asynchronous close and further investigation uncovered additional issues with a ClosedByInterruptedException.

      In StressNativeSignal test, a race condition caused the repeated executed of a receive loop. The initial iteration should have resulted in an AsynchronousCloseException and a subsequent invocation of received resulting in a ClosedChannelException.

       the ClosedChannelException is thrown by the receive call flow but due inheritance from AbstractInterruptibleChannel, it is "overtaken" by the AsynchronousCloseException thrown by the AIC::end method

            msheppar Mark Sheppard
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: