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

Magma uses incorrect length during pwrite retry

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      Magma's filesystem wrapper has a bug where if a pwrite is retried due to a partial write or EINTR or EAGAIN, we use the original length ie. the length of the partial write is not decremented correctly. This can result in segfaults(since we are writing a length greater than buffer length) or WAL corruption since the WAL tried repair of blocks.

      This is the incorrect lines of code, we should be using nwrite instead of len.

      This was noticed while reviewing code for MB-56097 and is a must fix.

      Attachments

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

        Activity

          People

            apaar.gupta Apaar Gupta
            apaar.gupta Apaar Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty