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

panic on indexer restart when secondary key size is exactly 65524

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      If there is a secondary key which is exactly 65524 bytes, then when a page is merged and a remove block is persisted to the LSS, during recovery, the key length field overflows and causes a panic:

      panic: runtime error: index out of range [0] with length 0 [recovered]
              panic: runtime error: index out of range [0] with length 0
       
      goroutine 25 [running]:
      panic({0x105358e80, 0x14000000288})
              /usr/local/go/src/runtime/panic.go:884 +0x1f4
      github.com/couchbase/plasma.(*Buffer).Ptr(...)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/util.go:177
      github.com/couchbase/plasma.(*Shard).recoverFromHeaderReplay.func8(0x2106e, {0x106e80072, 0x10004, 0x10f8e}, 0x10000)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/recovery.go:954 +0x15bc
      github.com/couchbase/plasma.(*lsStore).Visitor2(0x140000fe7c0?, 0x0?, 0x32000, 0x140004d68c0, 0x140000fe7c0)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/lss.go:615 +0xf4
      github.com/couchbase/plasma.(*lsStore).Visitor(0x14000524d80, 0x27?, 0x14000126768?)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/lss.go:598 +0x6c
      github.com/couchbase/plasma.(*Shard).recoverFromHeaderReplay(0x140000023c0?, 0x14000002280, 0x140000023c0, 0x14000585810, 0x14000126af8, 0x14000444c50)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/recovery.go:1042 +0x858
      github.com/couchbase/plasma.(*Shard).doRecovery(0x140003e4f00, 0x140004cf040, 0x14000002280, 0x140000023c0, 0x140004c8300, 0x0, 0x0)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/recovery.go:388 +0x648
      github.com/couchbase/plasma.(*Shard).recoverFromShard.func2()
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/recovery.go:228 +0x40
      github.com/couchbase/plasma.(*Shard).recoverFromShard(0x140003e4f00, 0x0?, 0x0?, 0x0?, 0x0?, 0x1?, 0x0?)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/recovery.go:247 +0xe4
      github.com/couchbase/plasma.doRecovery({0x0?, 0xc8?}, 0x190?, 0x140004c8300, 0x140003e4f00, 0x14000002280, 0x1053e5bf8?, 0x1053e5c48?)
              /Users/akhilmundroy/projects/couchbase-trinity/goproj/src/github.com/couchbase/plasma/recovery.go:2154 +0x88
      

      Attachments

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

        Activity

          People

            akhil.mundroy Akhil Mundroy
            akhil.mundroy Akhil Mundroy
            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