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

Lock order inversion in diagnostic latches when currentOpSpawnsThreadWaitingForLatch failpoint is enabled

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

      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:
              Resolved: