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

[System Test][Secondary-index] runtime error: invalid memory address or nil pointer dereference

    XMLWordPrintable

Details

    Description

      Test -

      -test tests/integration/neo/test_neo_couchstore.yml -scope tests/integration/neo/scope_couchstore.yml
      

      Day - 1
      Scale - 3
      Cycle - 1

      172.23.104.67
      panic

      2021-10-11T22:52:30.422-07:00 [Error] KVSender::sendShutdownTopic Unexpected Error During Shutdown Projector 172.23.99.25:9999 Topic MAINT_STREAM_TOPIC_7b96fa6a476704906cd666fa20ff0dce. Err projector.topicMissing
      2021-10-11T22:52:30.422-07:00 [Error] KVSender::closeMutationStream MAINT_STREAM  Error Received projector.topicMissing from 172.23.99.25:9999
      2021-10-11T22:52:30.422-07:00 [Info] KVSender::closeMutationStream MAINT_STREAM  Treating projector.topicMissing As Success
      2021/10/11 22:52:31 http: panic serving 172.23.104.69:37722: runtime error: invalid memory address or nil pointer dereference
      goroutine 279 [running]:
      net/http.(*conn).serve.func1(0xc0001af360)
      	/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.5/go/src/net/http/server.go:1824 +0x153
      panic(0x11a5900, 0x1fc3870)
      	/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.5/go/src/runtime/panic.go:971 +0x499
      github.com/couchbase/indexing/secondary/manager.(*requestHandlerContext).handleLocalIndexMetadataRequest(0x2048340, 0x15332a0, 0xc002c0afc0, 0xc001533000)
      	/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/indexing/secondary/manager/request_handler.go:1731 +0xda0
      net/http.HandlerFunc.ServeHTTP(0xc0061c4770, 0x15332a0, 0xc002c0afc0, 0xc001533000)
      	/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.5/go/src/net/http/server.go:2069 +0x44
      net/http.(*ServeMux).ServeHTTP(0xc000433140, 0x15332a0, 0xc002c0afc0, 0xc001533000)
      	/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.5/go/src/net/http/server.go:2448 +0x1ad
      net/http.serverHandler.ServeHTTP(0xc0034b1420, 0x15332a0, 0xc002c0afc0, 0xc001533000)
      	/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.5/go/src/net/http/server.go:2887 +0xa3
      net/http.(*conn).serve(0xc0001af360, 0x153dfe0, 0xc005a12200)
      	/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.5/go/src/net/http/server.go:1952 +0x8cd
      created by net/http.(*Server).Serve
      	/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.5/go/src/net/http/server.go:3013 +0x39b
      

      Most likely a regression introduced with the following change -
      http://review.couchbase.org/c/indexing/+/162484

      Attachments

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

        Activity

          Sujay Gad You are correct about the source of the regression. Trivial fix: need to check for cachedMeta != nil on result from GetLocalIndexMetadataFromCache() when handleLocalIndexMetadataRequest() calls it. Previously it checked for err == nil which implied cachedMeta != nil, but the original change removed the err check (as the function no longer can return an error) but forgot to add a replacement check of cachedMeta.

          kevin.cherkauer Kevin Cherkauer added a comment - Sujay Gad You are correct about the source of the regression. Trivial fix: need to check for cachedMeta != nil on result from GetLocalIndexMetadataFromCache() when handleLocalIndexMetadataRequest() calls it. Previously it checked for err == nil which implied cachedMeta != nil, but the original change removed the err check (as the function no longer can return an error) but forgot to add a replacement check of cachedMeta.

          Build couchbase-server-7.1.0-1483 contains indexing commit f850d70 with commit message:
          MB-48869 Add missing nil check for GetLocalIndexMetadataFromCache return

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1483 contains indexing commit f850d70 with commit message: MB-48869 Add missing nil check for GetLocalIndexMetadataFromCache return
          sujay.gad Sujay Gad added a comment -

          Panic not observed with system test run on 7.1.0 - 1804.

          sujay.gad Sujay Gad added a comment - Panic not observed with system test run on 7.1.0 - 1804.

          People

            kevin.cherkauer Kevin Cherkauer
            sujay.gad Sujay Gad
            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