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

unsafe access to grid.catalogManager at shutdown

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.9
    • Affects Version/s: 3.1.4
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 9 (09/18/15), Sharding A (10/09/15)
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      calls to grid.catalogManager() does not have any synchronization protection. This is fine in mongos as it is initialized at startup and is never modified. However, this is not true for mongod as the initialization happens when the server is processing requests. This is fine in most of mongod usages in d_migrate, d_split and d_merge since they ensure that it has been properly initialized (with the mutex) with the exception of the exit handler:

      https://github.com/mongodb/mongo/blob/r3.1.4/src/mongo/db/instance.cpp#L1292

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: