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

filemd5 command fails to safely clean up PlanExecutor after manual yield

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0.1, 4.1.1
    • GridFS
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Query 2018-07-02
    • 60

    Description

      The command creates a PlanExecutor here, and in order to destroy a PlanExecutor, a collection lock must be held in MODE_IS. If the command exits via an exception while yielded, this will not be true.

      For example, if this AutoGetCollectionForReadCommand throws an exception due to interrupt from a step-down, the PlanExecutor will be destroyed without holding a lock.

      While being destroyed, the PlanExecutor needs to communicate to the collection's cursor manager that it is being deleted, so doing so without a lock can lead to a race, as described in SERVER-25694.

      Attachments

        Activity

          People

            charlie.swanson@mongodb.com Charlie Swanson
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: