GlobalCursorIdCache::timeoutCursors() sometimes sees a view, resulting in a crash

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.7.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Query 2018-02-26
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When the CursorIdCache::timeoutCursors() iterates over its cursors, it locks them using an AutoGetCollectionForReadCommand title that will uassert when locking a view.

      There should not be a view among the cursors managed by CursorIdCache, but timeoutCursors() does not hold the lock while it iterates, so there is a window of time during which a collection can be dropped and replaced by a view with the same name. Because the uassert occurs as part of the cursor cleanup background job, it crashes the server.

            Assignee:
            Justin Seyster
            Reporter:
            Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: