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

createRandomCursorExecutor holds the CSSLock while potentially executing a TrialStage

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.0
    • Sharding EMEA 2023-05-01
    • 119

      PipelineD::createRandomCursorExecutor takes a ScopedCollectionShardingState, which holds the CSS RESOURCE_MUTEX, and still holds it when it constructs the PlanExecutor. The PlanExecutor constructor may actually execute a TrialStage, during which it can yield/restore the locks. RESOURCE_MUTEXes are not yielded, so on restore a lock inversion can happen.

            Assignee:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: