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

(se) Selector.open fails if invoked with thread interrupt status set [win]

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b73
    • OS:
      windows
    • Verification:
      Verified

      Backports

        Description



        import java.nio.channels.*;

        public class Test {
            public static void main(String... args) throws Exception {
                Thread.currentThread().interrupt();
                Selector.open();
            }
        }


        C:\> java Test
        Exception in thread "main" java.io.IOException: Unable to establish loopback connection
                at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:125)
                at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:69)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:141)
                at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
                at java.nio.channels.Pipe.open(Pipe.java:150)
                at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:126)
                at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
                at java.nio.channels.Selector.open(Selector.java:227)
                at Test.main(Test.java:7)
        Caused by: java.nio.channels.ClosedByInterruptException
                at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
                at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:634)
                at java.nio.channels.SocketChannel.open(SocketChannel.java:184)
                at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:97)
                ... 9 more


          Activity

          Hide
          dxu Dan Xu (Inactive) added a comment -
          The draft fix is uploaded at http://cr.openjdk.java.net/~dxu/8002306/webrev/ for review.
          Show
          dxu Dan Xu (Inactive) added a comment - The draft fix is uploaded at http://cr.openjdk.java.net/~dxu/8002306/webrev/ for review.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/d29a7ce28189
          User: alanb
          Date: 2013-01-08 20:49:15 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/d29a7ce28189 User: alanb Date: 2013-01-08 20:49:15 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/d29a7ce28189
          User: lana
          Date: 2013-01-15 19:00:22 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/d29a7ce28189 User: lana Date: 2013-01-15 19:00:22 +0000

            People

            • Assignee:
              dxu Dan Xu (Inactive)
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: