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

TEST_BUG: sun/security/ssl/javax/net/ssl/NewAPIs/SessionCacheSizeTests.java fails because of race condition

    XMLWordPrintable

    Details

      Backports

        Description

        TESTFAIL:sun/security/ssl/javax/net/ssl/NewAPIs/SessionCacheSizeTests.java

        In sun/security/ssl/javax/net/ssl/NewAPIs/SessionCacheSizeTests.java, there is a race condition which is causing this test to fail under a brand new 2-way SunFire 4150 (flicker). It's only occasionally failing, so it may take a while to reproduce.

        For example, in SessionCacheSizeTests, the SSLSockets are getting created ok, ports: 60982-4, but eventually when we try to recreate the socket in line 195, the serverports array element used has "0" (using a println debug), so it's trying to connect to ("localhost", 0), which fails.

        Current cacheSize is set to: 0

        Currently cached Sessions......
        ========================================================================
        Session Session-last-accessTime
        ========================================================================
        [Session-4, SSL_RSA_WITH_RC4_128_MD5] Fri Jun 27 15:07:29 PDT 2008
        [Session-6, SSL_RSA_WITH_RC4_128_MD5] Fri Jun 27 15:07:29 PDT 2008
        [Session-2, SSL_RSA_WITH_RC4_128_MD5] Fri Jun 27 15:07:29 PDT 2008
        ------------------------------------------------------------------------
        Session cache size changed to: 2

        [Session-4, SSL_RSA_WITH_RC4_128_MD5] Fri Jun 27 15:07:29 PDT 2008
        [Session-6, SSL_RSA_WITH_RC4_128_MD5] Fri Jun 27 15:07:29 PDT 2008
        ------------------------------------------------------------------------
        Session cache size changed to: 3

        STDERR:
        java.net.NoRouteToHostException: Cannot assign requested address
                at java.net.PlainSocketImpl.socketConnect(Native Method)
                at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
                at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
                at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
                at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:380)
                at java.net.Socket.connect(Socket.java:569)
                at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:569)
                at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:372)
                at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:90)
                at SessionCacheSizeTests.doClientSide(SessionCacheSizeTests.java:195)
                at SessionCacheSizeTests.startClient(SessionCacheSizeTests.java:408)
                at SessionCacheSizeTests.<init>(SessionCacheSizeTests.java:331)
                at SessionCacheSizeTests.main(SessionCacheSizeTests.java:297)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:623)
                at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:78)
                at java.lang.Thread.run(Thread.java:674)

        JavaTest Message: Test threw exception: java.net.NoRouteToHostException: Cannot assign requested address
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: java.net.NoRouteToHostException: Cannot assign requested address

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                xuelei Xue-Lei Fan
                Reporter:
                wetmore Bradford Wetmore
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: