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

SessionCatalog mutex is level 0 and is held while acquiring the FutureResolution mutex

    • Fully Compatible
    • ALL
    • v4.9
    • Service Arch 2021-05-17
    • 162
    • 1

      The FutureResolution mutex is marked level 0. So is the SessionCatalog mutex. This is a problem because while the SessionCatalog mutex is held, we call OperationContext::markKilled, which then resolves a future which requires acquiring the FutureResolution mutex. This is only a problem in tests since there's no actual risk for deadlock - it's just reported as a level violation by the latch analyzer.

      To fix it we need to either make the SessionCatalog mutex level 1, or make the FutureResolution into a std::mutex with no leveling since it's such a low level component.

       

      Acceptance criteria:

      Remove the hierarchy number from the FutureResolution mutex

            Assignee:
            luis.osta@mongodb.com Luis Osta (Inactive)
            Reporter:
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: