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

ClientCursor::staticYield could deadlock

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.1.1
    • None
    • None
    • ALL

    Description

      ClientCursor::staticYeild locks the LockMongoFiles lock, then releases the database lock. When it goes to re-acquire the database lock, since it already holds the LockMongoFiles lock, it has reversed the lock acquisition order. This means it can deadlock with other callers of staticYield.

      The canonical order is to acquire the LockMongoFiles lock after the database locks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: