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

panic when indexer file is manually corrupted - handle data corruption

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 4.6.3
    • secondary-index
    • Version: 4.6.3-4103 Enterprise Edition (build-4103)
    • Untriaged
    • No

    Description

      Steps to repro :
      1) Create a 3 node cluster kv-index-n1ql
      2) Create some indexes
      3) Open any index_name/snapshot/data/shard-0 file and add some junk data
      4) restart indexer.

      Following panic is seen.

      panic: runtime error: slice bounds out of range
       
      goroutine 132 [running]:
      panic(0xf7a6e0, 0xc820014060)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.6.3/go/src/runtime/panic.go:481 +0x3e6 fp=0xc823265d20 sp=0xc823265ca0
      runtime.panicslice()
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.6.3/go/src/runtime/panic.go:34 +0x65 fp=0xc823265d48 sp=0xc823265d20
      github.com/couchbase/indexing/secondary/indexer.vbucketFromEntryBytes(0x7fd1b699100c, 0x6261, 0x6261, 0x400, 0x20)
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/indexing/secondary/indexer/memdb_slice_impl.go:75 +0x173 fp=0xc823265dd0 sp=0xc823265d48
      github.com/couchbase/indexing/secondary/indexer.(*memdbSlice).loadSnapshot.func3(0xc8230e0c00)
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/indexing/secondary/indexer/memdb_slice_impl.go:857 +0x90 fp=0xc823265e48 sp=0xc823265dd0
      github.com/couchbase/indexing/secondary/memdb.(*MemDB).LoadFromDisk.func1(0x7fd1b698af80)
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/indexing/secondary/memdb/memdb.go:969 +0x84 fp=0xc823265e78 sp=0xc823265e48
      github.com/couchbase/indexing/secondary/memdb/skiplist.(*Segment).Add(0xc8239484e0, 0x7fd1b6991000)
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/indexing/secondary/memdb/skiplist/builder.go:40 +0x2ec fp=0xc823265ef8 sp=0xc823265e78
      github.com/couchbase/indexing/secondary/memdb.(*MemDB).LoadFromDisk.func3(0xc8232113e0, 0xc8230e0bb0, 0x1, 0x1, 0xc8230e0bc0, 0x1, 0x1, 0xc82002a720, 0x1, 0x1, ...)
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/indexing/secondary/memdb/memdb.go:1011 +0x17a fp=0xc823265f58 sp=0xc823265ef8
      runtime.goexit()
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.6.3/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc823265f60 sp=0xc823265f58
      created by github.com/couchbase/indexing/secondary/memdb.(*MemDB).LoadFromDisk
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/indexing/secondary/memdb/memdb.go:1014 +0x9e9
      

      Log attached.

      Attachments

        Issue Links

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

          Activity

            People

              Balakumaran.Gopal Balakumaran Gopal
              Balakumaran.Gopal Balakumaran Gopal
              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