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

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

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: