Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-61804

Fix race in ConfirmSocketSetOptionOnResetConnections in transport_layer_asio_test.cpp

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.3.0-rc0, 5.0.7, 5.2.2
    • None
    • None
    • Service Arch
    • Fully Compatible
    • ALL
    • v5.2, v5.0
    • Service Arch 2021-12-13, Service Arch 2022-1-10
    • 34

    Description

      ConfirmSocketSetOptionOnResetConnections may have a race in it wherein an ASIO socket's connect() call may not return by the time the ASIO acceptor on the server end returns from accept(). In ConfirmSocketSetOptionOnResetConnections, this allows the server side to close the connection before connect() finishes, which causes connect() to fail and throw, failing the test. Add a synchronization mechanism to ensure that the onAccept() callback associated with the acceptor doesn't run until connect() has fully completed. 

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            tyler.seip@mongodb.com Tyler Seip (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: