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

CouchKVStore invalid read when reading 3.x data

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.1.2
    • 4.0.0, 4.1.1, 4.5.0
    • couchbase-bucket
    • None
    • Untriaged
    • Unknown

    Description

      This issue could manifest itself as a segfault during upgrade from 3 to 4

      KV-engine metadata has the following 3 evolutions.

      epoch (version 0)

      struct metadata {
        uint64 cas;
        uint32 expiry;
        uint32 flags;
      }
      

      version 1

      struct metadata {
        uint64 cas;
        uint32 expiry;
        uint32 flags;
        uint8 ext1;
        uint8 ext2;
      }
      

      version 2

      struct metadata {
        uint64 cas;
        uint32 expiry;
        uint32 flags;
        uint8 ext1;
        uint8 ext2;
        uint8 conflict_resolution_mode;
      }
      

      This was discovered when error injecting in unit-tests on the master/watson branch and shows up in valgrind as an invalid read of 1 byte.

      (details of test to be uploaded).

      Attachments

        There are no Sub-Tasks for this issue.
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty