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

TransportLayerManager concurrent shutdown and startup will crash

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • Fully Compatible
    • ALL
    • Networking & Obs 2024-12-09
    • 200

      TransportLayerManagerImpl uses invariant to enforce strict state transitions from kUninitialized -> kSetup -> kStarted -> kShutdown. However, the state can also transition to kShutdown from any state, and this can happen at any time (e.g. if a SIGTERM signal is handled). If such a signal happens to be received prior to startup being completed, an invariant can be triggered, crashing the process during shutdown.

      We should relax these invariants to expect that shutdown may come at any time.

      https://github.com/mongodb/mongo/blob/51a159d0d1b0d278a0107dffe474d597f91d361b/src/mongo/transport/transport_layer_manager_impl.cpp#L73

            Assignee:
            patrick.freed@mongodb.com Patrick Freed
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: