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

[BP MB-40422] - Eventing: panic when body is null for /api/v1/functions/test/deploy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.6.0
    • Fix Version/s: 6.6.1
    • Component/s: eventing

      Description

      Build: 6.6.0 build 7854

      Observed panic when we callĀ /api/v1/functions/test/deploy without body as

       curl --location --request POST 'http://10.143.192.102:8096/api/v1/functions/test/deploy' \
      --header 'Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==' \
      --header 'Content-Type: application/json' \
      --data-raw 'null'

      panic

      2020/07/13 00:22:35 http: panic serving 10.143.192.1:50041: assignment to entry in nil map2020/07/13 00:22:35 http: panic serving 10.143.192.1:50041: assignment to entry in nil mapgoroutine 31421 [running]:net/http.(*conn).serve.func1(0xc421b177c0) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/net/http/server.go:1726 +0xd0panic(0x12b7060, 0x14f1ec0) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/runtime/panic.go:502 +0x229github.com/couchbase/eventing/service_manager.(*ServiceMgr).functionsHandler(0xc4202cb500, 0x14fe760, 0xc4202c0ee0, 0xc426049800) /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/service_manager/http_handlers.go:2716 +0x23f9github.com/couchbase/eventing/service_manager.(*ServiceMgr).(github.com/couchbase/eventing/service_manager.functionsHandler)-fm(0x14fe760, 0xc4202c0ee0, 0xc426049800) /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/service_manager/manager.go:168 +0x48net/http.HandlerFunc.ServeHTTP(0xc4204029c0, 0x14fe760, 0xc4202c0ee0, 0xc426049800) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/net/http/server.go:1947 +0x44net/http.(*ServeMux).ServeHTTP(0xc4203d9ec0, 0x14fe760, 0xc4202c0ee0, 0xc426049800) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/net/http/server.go:2337 +0x130net/http.serverHandler.ServeHTTP(0xc4203d4ea0, 0x14fe760, 0xc4202c0ee0, 0xc426049800) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/net/http/server.go:2694 +0xbcnet/http.(*conn).serve(0xc421b177c0, 0x14fefe0, 0xc421abff40) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/net/http/server.go:1830 +0x651created by net/http.(*Server).Serve /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/net/http/server.go:2795 +0x27b2020-07-13T00:22:35.705-07:00 [Info] ServiceMgr::GetTaskList rev: service.Revision(nil) 

        Attachments

          Issue Links

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

            Activity

            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-6.6.1-9069 contains eventing commit 71b12bb with commit message:
            MB-40945: Fixed panic when the data supplied to deploy was null

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.1-9069 contains eventing commit 71b12bb with commit message: MB-40945 : Fixed panic when the data supplied to deploy was null
            Hide
            vikas.chaudhary Vikas Chaudhary added a comment -

            verified on 6.6.1-9072

            vikass-MacBook-Pro:~ vikaschaudhary$  curl --location --request POST 'http://10.143.192.102:8096/api/v1/functions/test/deploy' \
            > --header 'Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==' \
            > --header 'Content-Type: application/json' \
            > --data-raw 'null'
            {
             "name": "ERR_MARSHAL_RESP",
             "code": 14,
             "description": "Unable to marshal response",
             "attributes": null,
             "runtime_info": {
              "code": 14,
              "info": "4 failed to unmarshal setting supplied, data sent in the request body is invalid."
             }
            } 

            Show
            vikas.chaudhary Vikas Chaudhary added a comment - verified on 6.6.1-9072 vikass-MacBook-Pro:~ vikaschaudhary$ curl --location --request POST 'http://10.143.192.102:8096/api/v1/functions/test/deploy' \ > --header 'Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==' \ > --header 'Content-Type: application/json' \ > --data-raw 'null' { "name": "ERR_MARSHAL_RESP", "code": 14, "description": "Unable to marshal response", "attributes": null, "runtime_info": { "code": 14, "info": "4 failed to unmarshal setting supplied, data sent in the request body is invalid." } }

              People

              Assignee:
              vinayaka.kamath Vinayaka Kamath
              Reporter:
              jeelan.poola Jeelan Poola
              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