ServiceEntryPointImpl::startSession races

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: 6.2.0-rc0
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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. 

            Assignee:
            Alex Li
            Reporter:
            Alex Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: