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

Crash when running a select query with a where clause

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • cbq-beta, 4.0.0
    • cbq-DP4
    • query
    • Security Level: Public
    • None
    • Untriaged
    • Unknown

    Description

      Steps to reproduce

      1. run cbq-engine against a single node couchbase server with the default buckets (beer-sample, gamesim-sample)
      2. create primary index on `beer-sample`;
      3. select * from `beer-sample` where `beer-sample`.category="Irish Ale";

      The query hangs and I see the following stack trace on the console

      _time=2015-02-24T23:50:09+05:30 _level=INFO _msg=Found index name #primary keyspace beer-sample
      _time=2015-02-24T23:50:09+05:30 _level=INFO _msg=Found index #primary on keyspace beer-sample
      _time=2015-02-24T23:50:09+05:30 _level=ERROR _msg= panic=runtime error: invalid memory address or nil pointer dereference stack=goroutine 292 [running]:
      github.com/couchbase/query/server.funcĀ·003()
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/server/server.go:130 +0xa5
      runtime.panic(0x973740, 0x10d0764)
      /usr/local/go/src/pkg/runtime/panic.c:248 +0x18d
      github.com/couchbase/query/planner.SargableFor(0x3102af8, 0xc208f766e0, 0x0, 0x0, 0xc209f86360)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/planner/sargable.go:17 +0x2d
      github.com/couchbase/query/plan.(*builder).selectScan(0xc2098a6630, 0x1423ac0, 0xc208acccd0, 0xc208f77db0, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/plan/build_scan.go:104 +0xb09
      github.com/couchbase/query/plan.(*builder).VisitKeyspaceTerm(0xc2098a6630, 0xc208f77db0, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/plan/build_select.go:234 +0x697
      github.com/couchbase/query/algebra.(*KeyspaceTerm).Accept(0xc208f77db0, 0x1421d30, 0xc2098a6630, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/algebra/from.go:110 +0x60
      github.com/couchbase/query/plan.(*builder).VisitSubselect(0xc2098a6630, 0xc208f76050, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/plan/build_select.go:92 +0x1b46
      github.com/couchbase/query/algebra.(*Subselect).Accept(0xc208f76050, 0x1421d30, 0xc2098a6630, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/algebra/select.go:328 +0x60
      github.com/couchbase/query/plan.(*builder).VisitSelect(0xc2098a6630, 0xc208f760a0, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/plan/build_select.go:35 +0x168
      github.com/couchbase/query/algebra.(*Select).Accept(0xc208f760a0, 0x1421ca0, 0xc2098a6630, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/algebra/select.go:59 +0x60
      github.com/couchbase/query/plan.(*builder).VisitExplain(0xc2098a6630, 0xc20965c880, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/plan/build_explain.go:17 +0xd9
      github.com/couchbase/query/algebra.(*Explain).Accept(0xc20965c880, 0x1421ca0, 0xc2098a6630, 0x0, 0x0, 0x0, 0x0)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/algebra/explain.go:47 +0x60
      github.com/couchbase/query/plan.Build(0x3103428, 0xc20965c880, 0x141c8c0, 0xc20802ca10, 0x141d1c8, 0xc2080a4000, 0xa831f0, 0x7, 0xc2089c7e00, 0x0, ...)
      /Users/manik/sherlock/goproj/src/github.com/couchbase/query/plan/build.go:23 +0x196
      github.com/couchbase/query/plan.BuildPrepared(0x3103428, 0xc20965c880, 0x141c8c0, 0xc20802ca10, 0x141d1c8, 0xc2080a4000, 0xa831f0, 0x7, 0xc208b4f600, 0x14204e8, ...)

      Attachments

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

        Activity

          People

            keshav Keshav Murthy
            manik Manik Taneja (Inactive)
            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