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

[N1QL] inline function returns a panic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.5.0
    • 6.5.0
    • query
    • 6.5.0-3687
    • Untriaged
    • Unknown

    Description

      Fresh install load up travel-sample and beer-sample
      Create this function:
      CREATE FUNCTION func4()

      { (select * from args[0] t where t.args[1] = args[2]) }

      Run it:
      execute function func4("travel-sample",type,"airline")

      [

      { "code": 5001, "msg": "Panic: runtime error: invalid memory address or nil pointer dereference" }

      ]

      You will get this panic

      Here is the function entry in the keyspace
      "functions_cache":

      { "#language": "inline", "avgServiceTime": "477.131µs", "expression": "(select self.* from (`args`[0]) as `t` where (((`t`.`args`)[1]) = (`args`[2])))", "lastUse": "2019-07-10 15:59:33.969529866 -0700 PDT m=+1833.863983592", "maxServiceTime": "477.131µs", "minServiceTime": "0s", "name": "func4", "namespace": "default", "node": "172.23.96.171:8091", "type": "global", "uses": 1 }

      Here are the logs:
      https://s3.amazonaws.com/bugdb/jira/inlinefunctions/collectinfo-2019-07-10T230201-ns_1%40172.23.96.249.zip
      https://s3.amazonaws.com/bugdb/jira/inlinefunctions/collectinfo-2019-07-10T230201-ns_1%40172.23.96.171.zip

      Attachments

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

        Activity

          People

            marco.greco Marco Greco (Inactive)
            ajay.bhullar Ajay Bhullar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty