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

[CBM] Crash when resuming an encrypted backup

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      Reproduction

      1. Create an encrypted backup repository
      2. Start a backup
      3. Ctrl-C around the time cbbackupmgr creates the DCP connection
        1. Look for  2023-06-20T09:24:40.160+01:00 (Couchbase) Successfully created DCP connection to cluster 'couchbase://localhost:12000?network=default' in the logs
      4. Try to resume the backup

      Stack trace

      2023-06-20T09:13:00.358+01:00 (DCP) (default) (vb 1011) Creating DCP stream | {"uuid":0,"start_seqno":0,"end_seqno":755,"snap_start":0,"snap_end":0,"retries":0}panic: runtime error: index out of range [1023] with length 0
      goroutine 242 [running]:github.com/couchbase/backup/crypt/filters.(*DirectEncryptor).encrypt(0xc000920000, 0xc0007ee3c0?, {0xc000bd9180, 0x306, 0x306})	/Users/mathall/Documents/code/cb_enterprise_src/backup/crypt/filters/encryption.go:104 +0x19agithub.com/couchbase/backup/crypt/filters.(*DirectEncryptor).EncryptDocument(0xc000920000, 0x3ff, 0xc0009fe700)	/Users/mathall/Documents/code/cb_enterprise_src/backup/crypt/filters/encryption.go:136 +0x12agithub.com/couchbase/backup/crypt/filters.encryptorCallbacks.Document({{{0x101af9a40?, 0xc001f8e168?}}, 0xc000920000?}, 0x0?, 0x0?)	/Users/mathall/Documents/code/cb_enterprise_src/backup/crypt/filters/encryption.go:180 +0x45github.com/couchbase/backup/plan/services/data.(*CompressionFilter).Document(0xc000543818, 0x6450?, 0xc0009fe700)	/Users/mathall/Documents/code/cb_enterprise_src/backup/plan/services/data/compression_filter.go:74 +0x206github.com/couchbase/backup/plan/services/data.(*CollectionFilter).Document(0xc001f8fdd0, 0x90a0?, 0xc0009fe700)	/Users/mathall/Documents/code/cb_enterprise_src/backup/plan/services/data/collection_filter.go:37 +0x6agithub.com/couchbase/backup/plan/services/data.(*ValidationFilter).Document(0xc001f8fde8, 0x3ff, 0xc0009fe700)	/Users/mathall/Documents/code/cb_enterprise_src/backup/plan/services/data/validation_filter.go:32 +0x75github.com/couchbase/backup/couchbase.(*DCPAsyncWorker).Mutation(0xc000f62000, {0x1, 0x1, 0x176893bf1cf20000, 0x0, 0x0, 0x0, 0x0, 0x3ff, 0x0, ...})	/Users/mathall/Documents/code/cb_enterprise_src/backup/couchbase/dcp_async_worker.go:408 +0x13agithub.com/couchbase/gocbcore/v10.(*dcpComponent).OpenStream.func1(0xc000bc65e0?, 0x0?, {0x0?, 0x0?})	/Users/mathall/.cbdepscache/gomodcache/pkg/mod/github.com/couchbase/gocbcore/v10@v10.2.0/dcpcomponent.go:119 +0x638github.com/couchbase/gocbcore/v10.(*memdQRequest).tryCallback(0xc000c4a780, 0xc0012360f0?, {0x0, 0x0})	/Users/mathall/.cbdepscache/gomodcache/pkg/mod/github.com/couchbase/gocbcore/v10@v10.2.0/memdqpackets.go:235 +0xf0github.com/couchbase/gocbcore/v10.(*memdClient).resolveRequest(0xc000fe0ee0, 0xc000bc5a70)	/Users/mathall/.cbdepscache/gomodcache/pkg/mod/github.com/couchbase/gocbcore/v10@v10.2.0/memdclient.go:363 +0x814github.com/couchbase/gocbcore/v10.(*memdClient).run.func1()	/Users/mathall/.cbdepscache/gomodcache/pkg/mod/github.com/couchbase/gocbcore/v10@v10.2.0/memdclient.go:391 +0x168created by github.com/couchbase/gocbcore/v10.(*memdClient).run	/Users/mathall/.cbdepscache/gomodcache/pkg/mod/github.com/couchbase/gocbcore/v10@v10.2.0/memdclient.go:379 +0xb8 

      Attachments

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

        Activity

          People

            gilad.kalchheim Gilad Kalchheim
            Matt.Hall Matt Hall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty