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

Lock order inversion in diagnostic latches when currentOpSpawnsThreadWaitingForLatch failpoint is enabled

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch
    • ALL
    • Service Arch 2024-04-15, Service Arch 2024-04-29, Programmability 2024-05-27
    • 14

      When the currentOpSpawnsThreadWaitingForLatch failpoint is enabled, the interruptibleState thread attempts to acquire _m while holding interruptibleState.mutex. This represents an inversion of the normal _m -> interruptibleState.mutex locking order.

      Possible solutions to investigate:

      • Temporarily release the interruptibleState.mutex lock when calling setIsWaiting
      • Obviate the _m lock by using atomics in setIsWaiting

            Assignee:
            james.bronsted@mongodb.com James Bronsted
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: