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

[Advisor] Panic in advisor session

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.1.0
    • 7.1.0
    • query
    • 7.1.0-1383
    • Untriaged
    • 1
    • Yes

    Description

      During sanity test with advisor session we see following panic. The test simply does:

      • SELECT ADVISOR({'action':'start', 'duration':'40m', 'profile': 'joaoDoe', 'query_count':5, 'response':'50ms'})
      • SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France"
      • SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France"
      • SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "grenoble" AND country = "France"
      • SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France"
      • SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France" [
      • SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France"
      • SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France"
      • RUN QUERY SELECT ADVISOR({'action':'stop', 'session':'e6778594-0fdd-46f7-be62-c326d39884d2'})
      • SELECT ADVISOR({'action':'get', 'session':'e6778594-0fdd-46f7-be62-c326d39884d2'}) as Get

      From query.log:

      2021-09-29T16:18:33.074-07:00 [SEVERE] panic: runtime error: invalid memory address or nil pointer dereference
      2021-09-29T16:18:33.075-07:00 [SEVERE] request text: <ud>SELECT RAW Advisor((SELECT statement, queryContext as query_context from system:completed_requests where users like "%joaoDoe%" and str_to_duration(elapsedTime)/1000000 > 50 and phaseOperators.advisor is missing and (clientContextID is missing OR clientContextID not like "INTERNAL%") and requestTime between "2021-09-29T16:18:00.119-07:00" and DATE_ADD_STR("2021-09-29T16:18:00.119-07:00", 2400,"second") order by requestTime limit 5))</ud>
      2021-09-29T16:18:33.075-07:00 [SEVERE] query context: <ud></ud>
      2021-09-29T16:18:33.075-07:00 [SEVERE] stack: goroutine 59048 [running]:
      github.com/couchbase/query/execution.(*Context).Recover(0xc00016f400, 0xc001a6e240)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:1018 +0xc6
      panic(0x21c6760, 0x35f88f0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:971 +0x499
      github.com/couchbase/query/execution.(*base).close(0xc001a6e240, 0xc00016f400)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:273 +0x233
      panic(0x21c6760, 0x35f88f0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:971 +0x499
      github.com/couchbase/query/execution.(*base).notify(0xc001a6e240)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:988 +0x178
      panic(0x21c6760, 0x35f88f0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:971 +0x499
      github.com/couchbase/query/datastore/couchbase.getUser(0x0, 0x0, 0x30, 0x22dc740)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/datastore/couchbase/collections.go:156 +0x33
      github.com/couchbase/query/datastore/couchbase.(*collection).GetRandomEntry(0xc00166dd40, 0x0, 0x0, 0x7f32581f69b8, 0xc00166dd40, 0xc000f94c01, 0xce472a, 0x21ddc20, 0x23e3c40)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/datastore/couchbase/collections.go:312 +0x4d
      github.com/couchbase/query/inferencer.MakeKeyspaceRandomDocumentRetriever(0x2721350, 0xc00166dd40, 0x90c, 0x7f32581f69b8, 0xc00166dd40, 0x1)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/inferencer/document_retrievers.go:342 +0xc9
      github.com/couchbase/query-ee/indexadvisor.getdocRetriver(0x2721350, 0xc00166dd40, 0x90c, 0x129395d, 0xc00126a700)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query-ee/indexadvisor/updateflavor.go:178 +0x1d5
      github.com/couchbase/query-ee/indexadvisor.collectFlavor(0x2721350, 0xc00166dd40, 0x2718438, 0xc00016f400, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query-ee/indexadvisor/updateflavor.go:85 +0x59
      github.com/couchbase/query-ee/indexadvisor.getFlavors(0x2721350, 0xc00166dd40, 0x2718438, 0xc00016f400, 0xc0012050c8)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query-ee/indexadvisor/updateflavor.go:56 +0x188
      github.com/couchbase/query-ee/indexadvisor.generateFlavorMap(0xc0014645a0, 0x2718438, 0xc00016f400, 0x245d9a0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query-ee/indexadvisor/updateflavor.go:43 +0x12b
      github.com/couchbase/query-ee/indexadvisor.AdviseIdxs(0xc0014645a0, 0xc001465e90, 0xc000053e80, 0x2, 0x2, 0x2498fc0, 0xc00016f400, 0x2718438, 0xc00016f400, 0x0)
       

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            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