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

Synchronize the connection and server threads in `transport_layer_test`

    • Fully Compatible
    • ALL
    • v7.0, v6.3, v6.2, v6.0, v5.0
    • Service Arch 2023-04-17
    • 0

      EgressConnectionResetByPeerDuringSessionCtor is designed to perform the following:

      • Start a listener thread (the server).
      • Create a connection to the server and block the connection before it attempts to set socket options (using a fail-point).
      • Have the server close the connection.
      • Verify the status that the newly created connection returns.

      Currently, the server thread doesn't wait for the client to reach the fail-point. As a result, the server may close the connection before the client thread attempts to create a session. This may result in the client returning ErrorCodes::HostUnreachable through the following code-path:

      • _doSyncConnect observes a closed socket (asio::error::connection_reset) before attempting to construct the Session object.
      • This is translated to DBException, potentially through here.
      • We later on add additional details to the Status object through here.

      So long as the server uses the fail-point to synchronizes with the client, this issue should be avoidable.

            Assignee:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Reporter:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: