Lock order inversion in diagnostic latches when currentOpSpawnsThreadWaitingForLatch failpoint is enabled

XMLWordPrintableJSON

    • Service Arch
    • Fully Compatible
    • ALL
    • v8.0
    • Service Arch 2024-04-15, Service Arch 2024-04-29, Programmability 2024-05-27
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

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

              Created:
              Updated:
              Resolved: