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

Socket reset issue for TLS 1.3 socket close

    Details

    • Subcomponent:
    • Introduced In Build:
      b20
    • Resolved In Build:
      b25
    • Verification:
      Not verified

      Backports

        Description

        After a long time of trying to get the code working I could able to write a logic to reproduce the intermittent failure.

        I have tried a lot many times and failure is reproducible every time with Multithreading .

        However , please note I left a commented code in main function, where the logic is looped just in case you don’t see the intermittent failure.

        The scenario is for testing “setNeedClientAuth” , the scenario is as follows reproducible with JDKb20

        1. Basic idea is to get a Client SSLSocket which is based on an empty keystore , so client has no way to authorize itself.
        2. Create a SSLServerSocket based on the JKS keystore attached (testkeys.jks) , configure it so that “setNeedClientAuth” is false.
        3. Accept the connections from client on a port which is shared with client.
        4. Client thread is started , the SSLSocketFactory is retrieved form a SSLContext which is initialized with an empty keystore ,
        SSLSocket is created.
        5. Client socket is connected to the server on the remote port
        6. Client sends some data to server
        7. Client closes its socket
        8. Server tries to read the data
        9. Server breaks with SSLException: Software caused connection abort: recv failed

        Please find the logs attached with “javax.net.debug=all” VM option (SSLSocketHanshakeLogs.txt)

        Please find the attached code “SSLSocketHandshake.java”

        **IMPORTANT** :
        If in the above order of operations, #7 is omitted, i.e. if the client socket is not closed, then there is NO intermittent SSLException

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  xuelei Xue-Lei Fan
                  Reporter:
                  bnallakaluva Bharath Nallakaluva (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: