Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-60183

Avoid data races in DcpProducer::control

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      During code inspection, found that some fields set as part of DCP control message processing are not updated in a thread-safe way.

      For example, we see the consumerName member (used for consumers supporting SyncReplication) is updated without thread synchronisation.

      This value is potentially heap allocated, and is always read when an associated ActiveStream is closed in removeAcksFromDM() (could happen from an a front-end or AuxIO thread). If the value is changed again after it has been originally set, this could result in a race where we could do a use-after-free.

      This will not happen with the known SyncRepl consumers, as they won't update their name multiple times, but we should fix this occurence and others.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mohammad.zaeem Mohammad Zaeem
            vesko.karaganev Vesko Karaganev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty