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

Make threads always acquire locks with strict ordering

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing

      Per SERVER-89730, a thread can acquire locks out of order, which can result in a deadlock. This could occur due to raw lock acquisitions, or due to multiple calls to acquisition APIs, which would individually acquire locks in order, but can break the ordering across acquisition calls.

      This ticket is to enforce at runtime that a thread/opCtx locks namespaces in-order (e.g. in ResourceId order), independent of the APIs used to acquire the lock. Depending on the runtime cost, this may be a debug build-only check. We should also consider extending this guardrail to DDL locks.

            Assignee:
            Unassigned Unassigned
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: