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

[Advisor] list all/completed returned 5001 error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.0.0
    • Cheshire-Cat
    • query
    • CentOS (VM)
      CB Version 7.0.0-3570
    • Untriaged
    • 1
    • Unknown

    Description

      List completed or all returned following error regardless if you have any sessions (all or completed). Note that 'active' works fine.

      "code": 5001,
      "msg": "Panic: Cannot create value for type []errors.Error."
      

      To repro:

      1. start session and allow it to complete
      2. list completed/all session
      3. For example:

        cbq> SELECT ADVISOR({'action': 'list', 'status': 'completed'}) ;
        {
            "requestID": "36a9db08-bb12-41a5-8266-7211e00e2f61",
            "signature": {
                "$1": "object"
            },
            "results": [
            {
                "$1": [
                    {
                        "tasks_cache": {
                            "class": "advisor",
                            "delay": "3m0s"
            ],
            "errors": [
                {
                    "code": 5001,
                    "msg": "Panic: Cannot create value for type []errors.Error."
                }
            ],
            "status": "aborted",
            "metrics": {
                "elapsedTime": "25.796522ms",
                "executionTime": "25.668736ms",
                "resultCount": 0,
                "resultSize": 0,
                "serviceLoad": 12,
                "errorCount": 1
            }
        }
        cbq> SELECT ADVISOR({'action': 'list', 'status': 'all'}) ;
        {
            "requestID": "a81bc571-6303-4c5e-8940-5855a417ab97",
            "signature": {
                "$1": "object"
            },
            "results": [
            {
                "$1": [
                    {
                        "tasks_cache": {
                            "class": "advisor",
                            "delay": "3m0s"
            ],
            "errors": [
                {
                    "code": 5001,
                    "msg": "Panic: Cannot create value for type []errors.Error."
                }
            ],
            "status": "aborted",
            "metrics": {
                "elapsedTime": "24.940619ms",
                "executionTime": "24.874758ms",
                "resultCount": 0,
                "resultSize": 0,
                "serviceLoad": 12,
                "errorCount": 1
            }
        }
        

         
        Here is stack from query.log:

      _time=2020-11-03T20:59:19.794+00:00 _level=SEVERE _msg=panic: Cannot create value for type []errors.Error.
      _time=2020-11-03T20:59:19.794+00:00 _level=SEVERE _msg=request text: <ud>SELECT ADVISOR({'action': 'list', 'status': 'completed'});</ud>
      _time=2020-11-03T20:59:19.794+00:00 _level=SEVERE _msg=query context: <ud></ud>
      _time=2020-11-03T20:59:19.794+00:00 _level=SEVERE _msg=stack: goroutine 2345 [running]:
      github.com/couchbase/query/execution.(*Context).Recover(0xc000dd5440, 0xc0009f5200)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:879 +0xbb
      panic(0x210f680, 0xc000fae130)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.13.7/go/src/runtime/panic.go:679 +0x1b2
      github.com/couchbase/query/value.NewValue(0x20b1cc0, 0xc000444820, 0x2489a39, 0x6)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/value/value.go:445 +0xdb6
      github.com/couchbase/query/value.objectValue.WriteJSON(0xc000f89320, 0x27140e0, 0xc000a1a120, 0xc00066fbc0, 0x10, 0x24868d5, 0x4, 0x2485d00, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/value/object.go:148 +0x2c2
      github.com/couchbase/query/value.(*annotatedValue).WriteJSON(0xc000f8a800, 0x27140e0, 0xc000a1a120, 0xc00066fbc0, 0x10, 0x24868d5, 0x4, 0x0, 0xc000c978c0, 0x119a912)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/value/annotated.go:131 +0x8b
      github.com/couchbase/query/value.objectValue.WriteJSON(0xc000f88de0, 0x27140e0, 0xc000a1a120, 0xc00066fbb0, 0xc, 0x24868d5, 0x4, 0xc000c97900, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/value/object.go:181 +0x5ab
      github.com/couchbase/query/value.sliceValue.WriteJSON(0xc000271c00, 0x1, 0x40, 0x27140e0, 0xc000a1a120, 0xc00066fba0, 0x8, 0x24868d5, 0x4, 0x2485d00, ...)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/value/array.go:63 +0x1f8
      github.com/couchbase/query/value.objectValue.WriteJSON(0xc000f461e0, 0x27140e0, 0xc000a1a120, 0x24868d5, 0x4, 0x24868d5, 0x4, 0xc000c97c00, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/value/object.go:181 +0x5ab
      github.com/couchbase/query/value.(*annotatedValue).WriteJSON(0xc000828900, 0x27140e0, 0xc000a1a120, 0x24868d5, 0x4, 0x24868d5, 0x4, 0x0, 0x1, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/value/annotated.go:131 +0x8b
      github.com/couchbase/query/server/http.(*httpRequest).Result(0xc000a18000, 0x27b3a60, 0xc000828900, 0x27b3a60)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/http/service_response.go:258 +0x214
      github.com/couchbase/query/execution.(*Context).Result(...)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:521
      github.com/couchbase/query/execution.(*Stream).processItem(0xc0009f5200, 0x27b3a60, 0xc000828900, 0xc000dd5440, 0xc000828900)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/stream.go:67 +0x56
      github.com/couchbase/query/execution.(*base).runConsumer.func1()
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:829 +0x2d7
      github.com/couchbase/query/util.(*Once).Do(0xc0009f5320, 0xc000c97f00)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/util/sync.go:55 +0x4a
      github.com/couchbase/query/execution.(*base).runConsumer(0xc0009f5200, 0x27493a0, 0xc0009f5200, 0xc000dd5440, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:774 +0xa2
      github.com/couchbase/query/execution.(*Stream).RunOnce(0xc0009f5200, 0xc000dd5440, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/stream.go:57 +0x5c
      github.com/couchbase/query/execution.execOp(0x2781620, 0xc0009f5200, 0xc000dd5440, 0x0, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:486 +0x54
      created by github.com/couchbase/query/execution.(*base).fork
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:496 +0xfa
      
      

       

       

      Attachments

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty