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

Cleanup order in Grid::clearForUnitTests can cause access to freed memory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Sharding
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2021-01-11, Sharding 2021-01-25
    • Linked BF Score:
      45

      Description

      Currently, clearForUnitTests clears the catalog client before the catalog cache. When it's CatalogCache to call it's destructor, it also tries to wait for all the pending task to complete. One of the possible tasks are calls to _lookupDatabase, which can eventually call ShardingCatalogClient::getDatabase.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              daniel.gottlieb Daniel Gottlieb
              Reporter:
              renctan Randolph Tan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: