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: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-01-20, CAR Team 2025-02-03
    • 200
    • 3

      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:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: