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

Take a shared_ptr to Trackers in IndexBuildsCoordinator before calling waitUntilNoIndexBuildsRemain

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.9
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2019-03-11
    • 83

      We have memory errors in the IndexBuildsCoordinator's use of the CollectionIndexBuildsTracker and DatabaseIndexBuildsTracker objects where we call waitUntilNoIndexBuildsRemain through hash map iterators rather than acquiring a safe shared_ptr to call wait upon, leading to a use after free when the entry is removed from the hash map and the caller of waitUntilNoIndexBuildsRemain does not have a shared_ptr instance to keep the object in memory.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: