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

sun/security/tools/keytool/printssl.sh failed with "Socket closed"

XMLWordPrintable

    • b127
    • Verified

        Test: sun/security/tools/keytool/printssl.sh
        Log:
        Exception in thread "Thread-0" Exception in thread "main" java.net.SocketException: Socket closed
        at java.net.PlainSocketImpl.socketAccept(java.base@9-ea/Native Method)
        at java.net.AbstractPlainSocketImpl.accept(java.base@9-ea/AbstractPlainSocketImpl.java:459)
        at java.net.ServerSocket.implAccept(java.base@9-ea/ServerSocket.java:546)
        at sun.security.ssl.SSLServerSocketImpl.accept(java.base@9-ea/SSLServerSocketImpl.java:352)
        at PrintSSL.main(PrintSSL.java:54)
        java.lang.RuntimeException: Timeout
        at PrintSSL$1.run(PrintSSL.java:49)

        .............
        result: Error. Program `sh' timed out (timeout set to 960000ms, elapsed time was 960002ms).
        test result: Error. Program `sh' timed out (timeout set to 960000ms, elapsed time was 960002ms).


        The test manage closing ServerSocket by another thread holding it for 30 second.
        Here it looks like the socket closed in between accept() called.

        To avoid such issue it can be implemented in a different way which can use socket.setSoTimeout() with try resource clause.

              ssahoo Sibabrata Sahoo (Inactive)
              ssahoo Sibabrata Sahoo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: