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

Copy Collection NamespaceString before yielding locks in AutoGetCollectionForRead

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.11, 4.2.0-rc2, 4.3.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • Execution Team 2019-06-17
    • 0

      AutoGetCollectionForRead yields its locks here, then tries to print a const NamespaceString& nss here.

      If the collection is dropped after the locks are yielded and before the line is printed, then it will result in an invalid access.

      We should copy the NamespaceString before yielding locks to print later on.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: