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

ServiceEntryPointImpl::startSession races

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • 6.2.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL

    Description

      ServiceEntryPointImpl::Sessions contains a SyncToken which is used to safely access Sessions::ByClientMap. ServiceEntryPointImpl::startSession races with other functions that modify the map:

      1. startSession creates a Sessions::iterator.
      2. A code block is started and a SyncToken is created (and therefore _sessions is locked).
      3. A SessionWorkflow is created and inserted, and the iterator is set.
      4. The code block ends, the SyncToken is destroyed, and _sessions is unlocked.
      5. The workflow is started by retrieving from SessionWorkflow from the iterator.

      If an operation occurs on _sessions between steps 4. and 5., then the iterator may be invalidated. 

      Attachments

        Activity

          People

            alex.li@mongodb.com Alex Li
            alex.li@mongodb.com Alex Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: