AsioTransportLayer::stopAcceptingSessions can deadlock if called before listener thread started listening

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.2.1, 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.2
    • Service Arch 2023-12-25
    • 105
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the event that stopAcceptingSessions is invoked after the asio listener thread has started but before it has actually begun listening, stopAcceptingSessions will block forever while trying to join the listener thread. This is because the listener thread's state only transitions to kShuttingDown if its prior state was kActive, not also kNew.

      This situation is pretty rare. An example trigger would be killing a new mongos/d process very quickly after starting it up.

              Assignee:
              Patrick Freed
              Reporter:
              Patrick Freed
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: