createRandomCursorExecutor holds the CSSLock while potentially executing a TrialStage

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: