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

Concurrent `checkIfOptionsConflict` running while state doc is being updated

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Sharding EMEA
    • ALL
    • 137

      When we create a DDL coordinator we may run checkIfOptionsConflict on the existing coordinator while it's running, which might be in the point of updating the state document, for example here. This update may result in part of the original state doc's memory freed. However, the concurrent `checkIfOptionsConflict` may be still accessing this freed memory, hence causing a crash.

      This problem might not be exposed to other DDL coordinators yet because `collModRequest` has more complicated internal structure like `std::vector<...>`, which we believe is being freed during the update, since the serialization code uses the reference of the vector instead of making a copy. That said, this seems to be generic sharding DDL coordinator problem that probably should be handled in a general way.

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            rui.liu@mongodb.com Rui Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: