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

[TEST BUG] Test SSLSession/SessionCacheSizeTests socket accept timed out

    Details

      Backports

        Description

        javax/net/ssl/SSLSession/SessionCacheSizeTests.java test failed with java.net.ConnectException: Connection refused


        Server died...
        Server died...
        Server died...
        Server died...
        java.net.SocketTimeoutException: Accept timed out
        at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
        at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
        at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
        at java.net.ServerSocket.implAccept(ServerSocket.java:546)
        at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:352)
        at SessionCacheSizeTests.doServerSide(SessionCacheSizeTests.java:135)
        at SessionCacheSizeTests$1.run(SessionCacheSizeTests.java:425)
        java.net.SocketTimeoutException: Accept timed out
        at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
        at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
        at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
        at java.net.ServerSocket.implAccept(ServerSocket.java:546)
        at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:352)
        at SessionCacheSizeTests.doServerSide(SessionCacheSizeTests.java:135)
        at SessionCacheSizeTests$1.run(SessionCacheSizeTests.java:425)
        java.net.SocketTimeoutException: Accept timed out
        at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
        at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
        at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
        at java.net.ServerSocket.implAccept(ServerSocket.java:546)
        at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:352)
        at SessionCacheSizeTests.doServerSide(SessionCacheSizeTests.java:135)
        at SessionCacheSizeTests$1.run(SessionCacheSizeTests.java:425)
        java.net.SocketTimeoutException: Accept timed out
        at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
        at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
        at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
        at java.net.ServerSocket.implAccept(ServerSocket.java:546)
        at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:352)
        at SessionCacheSizeTests.doServerSide(SessionCacheSizeTests.java:135)
        at SessionCacheSizeTests$1.run(SessionCacheSizeTests.java:425)
        java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
        at java.net.Socket.connect(Socket.java:591)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:655)
        at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:422)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
        at SessionCacheSizeTests.doClientSide(SessionCacheSizeTests.java:175)
        at SessionCacheSizeTests.startClient(SessionCacheSizeTests.java:470)
        at SessionCacheSizeTests.<init>(SessionCacheSizeTests.java:347)
        at SessionCacheSizeTests.main(SessionCacheSizeTests.java:312)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:520)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
        at java.lang.Thread.run(Thread.java:804)
        Caused by: java.net.SocketTimeoutException: Accept timed out
        at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
        at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
        at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
        at java.net.ServerSocket.implAccept(ServerSocket.java:546)
        at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:352)
        at SessionCacheSizeTests.doServerSide(SessionCacheSizeTests.java:135)
        at SessionCacheSizeTests$1.run(SessionCacheSizeTests.java:425)

          Issue Links

            Activity

            Hide
            tidu Tim Du (Inactive) added a comment -
            RULE "javax/net/ssl/SSLSession/SessionCacheSizeTests.java" Exception java.net.ConnectException: Connection refused: connect
            Show
            tidu Tim Du (Inactive) added a comment - RULE "javax/net/ssl/SSLSession/SessionCacheSizeTests.java" Exception java.net.ConnectException: Connection refused: connect
            Hide
            xuelei Xue-Lei Fan added a comment -
            Server sockets are accept timeout in 45000ms.
            Show
            xuelei Xue-Lei Fan added a comment - Server sockets are accept timeout in 45000ms.
            Hide
            wetmore Bradford Wetmore added a comment -
            By any chance, are we having similar problems with different symptoms with JDK-8146669
            Show
            wetmore Bradford Wetmore added a comment - By any chance, are we having similar problems with different symptoms with JDK-8146669
            Hide
            xuelei Xue-Lei Fan added a comment -
            Prolem:

                volatile int createdPorts = 0;

                // multiple threads operations:
                serverPorts[createdPorts++] = sslServerSocket.getLocalPort();

            Update to createdPorts should be synchronized.

            Show
            xuelei Xue-Lei Fan added a comment - Prolem:     volatile int createdPorts = 0;     // multiple threads operations:     serverPorts[createdPorts++] = sslServerSocket.getLocalPort(); Update to createdPorts should be synchronized.
            Hide
            darcy Joe Darcy added a comment -
            @Xue-Lei, in a case like this, it looks like you could also use a java.util.concurrent.atomic.AtomicInteger and call getAndIncrement.
            Show
            darcy Joe Darcy added a comment - @Xue-Lei, in a case like this, it looks like you could also use a java.util.concurrent.atomic.AtomicInteger and call getAndIncrement.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/d09282af3b52
            User: xuelei
            Date: 2016-01-12 08:05:52 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/d09282af3b52 User: xuelei Date: 2016-01-12 08:05:52 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/d09282af3b52
            User: lana
            Date: 2016-01-20 20:51:00 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/d09282af3b52 User: lana Date: 2016-01-20 20:51:00 +0000

              People

              • Assignee:
                xuelei Xue-Lei Fan
                Reporter:
                tidu Tim Du (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: