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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Query 2018-02-26
    • 0
    • None
    • 3
    • 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@mongodb.com Justin Seyster
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: