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

makeOperationContext should not be called on the primaryOnlyService instance cleanup executor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.7
    • Affects Version/s: 7.1.0-rc0
    • Component/s: None
    • Sharding EMEA
    • Fully Compatible
    • ALL
    • v7.0
    • Sharding EMEA 2023-08-21
    • 10
    • 2

      Full explanation in attached BF.

      makeOperationContext calls registerOpCtx in the primary only service, which acquires the primary only service mutex.

      If this is called while holding the sharding ddl coordinator service mutex, the operation holding it needs to be interrupted on stepdown to prevent a deadlock. In the case of constructInstance, it is being called on the instance cleanup executor (which is not interrupted on stepdown) while holding the sharding ddl coordinator service mutex. This can lead to deadlock on stepdown.

            Assignee:
            silvia.surroca@mongodb.com Silvia Surroca
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: