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

javax/net/ssl/SSLSession/SessionCacheSizeTests.java fails intermittently with java.net.SocketException: Address already in use (Listen failed)

    XMLWordPrintable

    Details

      Description

      This has been observed once in Linux X64 open only target.

      Please refer to the test output:
      ----------System.out:(23/1161)----------
      server #0 started on port 60343
      server #1 started on port 61867
      server #2 started on port 64926
      client #0 connects to port 60343
      client #1 connects to port 61867
      client #2 connects to port 64926
      Current cacheSize is set to: 0

      Currently cached Sessions......
      ========================================================================
      Session Session-last-accessTime
      ========================================================================
      [Session-7, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256] Tue Aug 30 22:11:27 PDT 2016
      [Session-3, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256] Tue Aug 30 22:11:27 PDT 2016
      [Session-5, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256] Tue Aug 30 22:11:27 PDT 2016
      ------------------------------------------------------------------------
      Session cache size changed to: 2

      [Session-3, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256] Tue Aug 30 22:11:27 PDT 2016
      [Session-5, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256] Tue Aug 30 22:11:27 PDT 2016
      ------------------------------------------------------------------------
      Session cache size changed to: 3
      client #3 connects to port 0
      ----------System.err:(48/3752)----------
      Server died...
      java.net.SocketException: Address already in use (Listen failed)
      at java.net.PlainSocketImpl.socketListen(java.base@9-internal/Native Method)
      at java.net.AbstractPlainSocketImpl.listen(java.base@9-internal/AbstractPlainSocketImpl.java:449)
      at java.net.ServerSocket.bind(java.base@9-internal/ServerSocket.java:377)
      at java.net.ServerSocket.<init>(java.base@9-internal/ServerSocket.java:238)
      at java.net.ServerSocket.<init>(java.base@9-internal/ServerSocket.java:182)
      at javax.net.ssl.SSLServerSocket.<init>(java.base@9-internal/SSLServerSocket.java:136)
      at sun.security.ssl.SSLServerSocketImpl.<init>(java.base@9-internal/SSLServerSocketImpl.java:116)
      at sun.security.ssl.SSLServerSocketFactoryImpl.createServerSocket(java.base@9-internal/SSLServerSocketFactoryImpl.java:79)
      at SessionCacheSizeTests.doServerSide(SessionCacheSizeTests.java:113)
      at SessionCacheSizeTests$1.run(SessionCacheSizeTests.java:446)
      java.net.ConnectException: Connection refused
      at java.net.PlainSocketImpl.socketConnect(java.base@9-internal/Native Method)
      at java.net.AbstractPlainSocketImpl.doConnect(java.base@9-internal/AbstractPlainSocketImpl.java:400)
      at java.net.AbstractPlainSocketImpl.connectToAddress(java.base@9-internal/AbstractPlainSocketImpl.java:243)
      at java.net.AbstractPlainSocketImpl.connect(java.base@9-internal/AbstractPlainSocketImpl.java:225)
      at java.net.SocksSocketImpl.connect(java.base@9-internal/SocksSocketImpl.java:402)
      at java.net.Socket.connect(java.base@9-internal/Socket.java:591)
      at sun.security.ssl.SSLSocketImpl.connect(java.base@9-internal/SSLSocketImpl.java:652)
      at sun.security.ssl.SSLSocketImpl.<init>(java.base@9-internal/SSLSocketImpl.java:417)
      at sun.security.ssl.SSLSocketFactoryImpl.createSocket(java.base@9-internal/SSLSocketFactoryImpl.java:88)
      at SessionCacheSizeTests.doClientSide(SessionCacheSizeTests.java:226)
      at SessionCacheSizeTests.startClient(SessionCacheSizeTests.java:491)
      at SessionCacheSizeTests.<init>(SessionCacheSizeTests.java:368)
      at SessionCacheSizeTests.main(SessionCacheSizeTests.java:332)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:535)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
      at java.lang.Thread.run(java.base@9-internal/Thread.java:843)
      Caused by: java.net.SocketException: Address already in use (Listen failed)
      at java.net.PlainSocketImpl.socketListen(java.base@9-internal/Native Method)
      at java.net.AbstractPlainSocketImpl.listen(java.base@9-internal/AbstractPlainSocketImpl.java:449)
      at java.net.ServerSocket.bind(java.base@9-internal/ServerSocket.java:377)
      at java.net.ServerSocket.<init>(java.base@9-internal/ServerSocket.java:238)
      at java.net.ServerSocket.<init>(java.base@9-internal/ServerSocket.java:182)
      at javax.net.ssl.SSLServerSocket.<init>(java.base@9-internal/SSLServerSocket.java:136)
      at sun.security.ssl.SSLServerSocketImpl.<init>(java.base@9-internal/SSLServerSocketImpl.java:116)
      at sun.security.ssl.SSLServerSocketFactoryImpl.createServerSocket(java.base@9-internal/SSLServerSocketFactoryImpl.java:79)
      at SessionCacheSizeTests.doServerSide(SessionCacheSizeTests.java:113)
      at SessionCacheSizeTests$1.run(SessionCacheSizeTests.java:446)

        Attachments

          Activity

            People

            Assignee:
            rhalade Rajan Halade
            Reporter:
            xiaofeya Xiaofeng Yang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: