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

FTS crashes when scan consistency level is passed in the query request

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Test Blocker
    • 6.5.0
    • 6.5.0
    • fts

    Description

      Seen in build sanity for build 6.5.0-2524.

      When an FTS search request contains scan_consistency level parameter, FTS crashes with the following panic:

      2019-03-05T14:21:59.058-08:00 [INFO] grpc_server: invoke server method: /search.SearchService/Search duration: 0.000316 sec err: <nil>
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc3e7cd]
       
      goroutine 898 [running]:
      github.com/couchbase/cbft.(*SearchService).Search(0xc00000e758, 0xc0002d7000, 0x10542c0, 0xc0008c2760, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/cbft/grpc_server.go:108 +0x15d
      github.com/couchbase/cbft/protobuf._SearchService_Search_Handler(0xe24240, 0xc00000e758, 0x1052e80, 0xc00023c000, 0xc00102dc00, 0x1c)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/cbft/protobuf/search.pb.go:1977 +0x109
      github.com/couchbase/cbft.serverInterceptor(0xe24240, 0xc00000e758, 0x10533c0, 0xc002193080, 0xc0001e1fe0, 0xf79738, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/cbft/grpc_server.go:251 +0x22e
      google.golang.org/grpc.(*Server).processStreamingRPC(0xc00008fc80, 0x1055e80, 0xc0008d0300, 0xc0002d6d00, 0xc000439c50, 0x18e81c0, 0x0, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/godeps/src/google.golang.org/grpc/server.go:1177 +0x488
      google.golang.org/grpc.(*Server).handleStream(0xc00008fc80, 0x1055e80, 0xc0008d0300, 0xc0002d6d00, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/godeps/src/google.golang.org/grpc/server.go:1249 +0xcfa
      google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0011a02f0, 0xc00008fc80, 0x1055e80, 0xc0008d0300, 0xc0002d6d00)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/godeps/src/google.golang.org/grpc/server.go:685 +0x9f
      created by google.golang.org/grpc.(*Server).serveStreams.func1
              /home/couchbase/jenkins/workspace/couchbase-server-unix/godeps/src/google.golang.org/grpc/server.go:683 +0xa1
      

      Queries causing failure:
      curl -XPOST -H "Content-Type: application/json" http://172.23.109.172:8094/api/index/default_index_1/query -d '{"ctl": {"timeout": 60000, "consistency": {"vectors": {}, "level": ""}},"from": 0,"fields": [], "explain": false,"query":

      {"field": "email", "match": "safiya@mcdiabetes.com"}

      , "size": 10000000}' -u Administrator:password

      curl -XPOST -H "Content-Type: application/json" http://172.23.109.172:8094/api/index/default_index_1/query -d '{"ctl": {"timeout": 60000, "consistency": {"level": "at_plus"}},"from": 0,"fields": [], "explain": false,"query":

      {"field": "email", "match": "safiya@mcdiabetes.com"}

      , "size": 10000000}' -u Administrator:password

      Marking this as a Test Blocker since it affects the Sanity suite.

      This is also a regression since 6.5.0-2521. The following commit might be the culprit:

       * Commit: ee82deef26f06bf6ba1001c145e280f248d68a41 in build: 6.5.0-2523
         enabling grpc based scatter gather
         
         Change-Id: Ib2733310d4f2b847f7764be531ac2b3ead7435ca
         Reviewed-on: http://review.couchbase.org/105711
         Well-Formed: Build Bot <build@couchbase.com>
         Reviewed-by: Steve Yen <steve.yen@gmail.com>
         Tested-by: Sreekanth Sivasankaran <sreekanth.sivasankaran@couchbase.com>
      

      Attachments

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

        Activity

          People

            Sreekanth Sivasankaran Sreekanth Sivasankaran (Inactive)
            mihir.kamdar Mihir Kamdar (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