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

Concurrent `checkIfOptionsConflict` running while state doc is being updated

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Sharding EMEA
    • ALL
    • 137

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: