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

Subdoc Fetch can cause panic (xattrs)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.3, 6.0.1, 6.5.0
    • 5.5.2, 6.0.0, 6.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      KV Fetch of XATTRS that contains non existent key (or deleted between indexscan and fetch).
      Repro: USE KEYS (need more than 1 key trigger issue, for one key it goes in different code path)

      SELECT META().xattrs._sync
      FROM default USE KEYS ["xxxx", "yy"];
      

      request text:
      <ud>select META().xattrs._sync from default use keys ["xxxx", "yy"];</ud>
       
      stack:
      goroutine 245 [running]:
      github.com/couchbase/query/execution.(*Context).Recover(0xc420733c80)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/execution/context.go:519 +0xbc
      panic(0x4ad5a40, 0x5444380)
      	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/panic.go:489 +0x2cf
      github.com/couchbase/query/datastore/couchbase.getSubDocFetchResults(0xc420d3e7e9, 0x2, 0xc420c13560, 0xc420cdd840, 0x2, 0x2, 0x1, 0xc420cdd840, 0x2)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/datastore/couchbase/couchbase.go:1123 +0xc03
      github.com/couchbase/query/datastore/couchbase.(*keyspace).Fetch(0xc4204d4460, 0xc420d63c00, 0x2, 0x40, 0xc420d0ea20, 0x53cb140, 0xc420733c80, 0xc420d3e990, 0x1, 0x2, ...)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/datastore/couchbase/couchbase.go:1072 +0x42e
      github.com/couchbase/query/execution.(*Fetch).flushBatch(0xc420d306c0, 0xc420733c80, 0x10000000474d900)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/execution/fetch.go:140 +0x290
      github.com/couchbase/query/execution.(*Fetch).afterItems(0xc420d306c0, 0xc420733c80)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/execution/fetch.go:82 +0x35
      github.com/couchbase/query/execution.(*base).runConsumer.func1()
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/execution/base.go:564 +0x296
      github.com/couchbase/query/util.(*Once).Do(0xc420d307c8, 0xc420add738)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/util/sync.go:53 +0x68
      github.com/couchbase/query/execution.(*base).runConsumer(0xc420d306c0, 0x53c8760, 0xc420d306c0, 0xc420733c80, 0x0, 0x0)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/execution/base.go:565 +0xaf
      github.com/couchbase/query/execution.(*Fetch).RunOnce(0xc420d306c0, 0xc420733c80, 0x0, 0x0)
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/execution/fetch.go:66 +0x5c
      created by github.com/couchbase/query/execution.(*base).runConsumer.func1
      	/Users/sitaram/master/olap/src/github.com/couchbase/query/execution/base.go:550 +0x2f6
      

      Attachments

        Activity

          People

            mihir.kamdar Mihir Kamdar (Inactive)
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty