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

indexer does not stop mutation when creating snapshot

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      In http://review.couchbase.org/c/plasma/+/149120, we added new assertion in plasma. We found that there are active writers while newSnapshot() is called. In plasma, memory can be freed (without holding mutex) since it expects that there is no writer being active when a snapshot is taken. This can cause double memory freed. In a small unit test, I can reproduce a variety of crashes and hang when there are concurrent writers during newSnapshot(). This includes
      MB-36937
      MB-40441
      MB-44556
      MB-44749

      We can also reproduce a number of hangs. When dumping the goroutines during hang, we also see that the gorountines stop at places where there is no mutex.

      If we comment out the free memory code in newSnapshot(), the test passes regularly.

      Attachments

        For Gerrit Dashboard: MB-45230
        # Subject Branch Project Status CR V

        Activity

          People

            deepkaran.salooja Deepkaran Salooja
            jliang John Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty