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

JSSE Session Reuse is Flaky

    XMLWordPrintable

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      The PR https://github.com/square/okhttp/pull/6616 shows a test using OkHttp client to connect to a local mock server. It fails around 50% of the time.

      The sun.security.util.MemoryCache inside sun.security.ssl.SSLSessionContextImpl appears to be unreliable as to when it will clear out entries.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Checkout https://github.com/square/okhttp and switch to PR https://github.com/square/okhttp/pull/6616

      Run the test SessionReuseTest

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Test should confirm that two sequential requests with fresh connections reuse the same SSL session.
      ACTUAL -
      Test fails because a second session is created. Debugging is difficult because the logic in sun.security.ssl.SSLSessionContextImpl is JDK internal, but by the time the second client lookup via "localhost:50701" type key is made the cache is empty again.

      FREQUENCY : often


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              xuelei Xue-Lei Fan
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: