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

metakv test intermittently failing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • Morpheus
    • None
    • cbauth
    • None
    • Triaged
    • 0
    • Unknown

    Description

      The TestSanity test in metakv/metakv_test.go has a race between closing the cancel channel and sending the last kv entry to the kveChan channel (https://src.couchbase.org/source/xref/trunk/goproj/src/github.com/couchbase/cbauth/metakv/metakv.go#308)

      Error when the cancel channel is closed before the last kv entry is sent:

      2023/07/28 11:40:00 Waiting for rows
      2023/07/28 11:40:00 Observed {/_sanity/key, value, }
      2023/07/28 11:40:00 Observed {/_sanity/key, new value, }
      2023/07/28 11:40:00 Observed {/_sanity/secret, secret, }
      2023/07/28 11:40:00 Observed {/_sanity/secret, , %!s(<nil>)}
      2023/07/28 11:40:00 Observed {/_sanity/key, , %!s(<nil>)}
      2023/07/28 11:40:00 receiver is dead
      --- FAIL: TestSanity (0.01s)
          sanity.go:62: Starting basic sanity test
          sanity.go:69: cleaned up /_sanity/ subspace
          sanity.go:91: Sanity observe loop exited
      panic: bad mutations size: 4 ([{/_sanity/key [118 97 108 117 101] [2 0 0 0 0 0 0 0] false} {/_sanity/key [110 101 119 32 118 97 108 117 101] [3 0 0 0 0 0 0 0] false} {/_sanity/secret [115 101 99 114 101 116] [4 0 0 0 0 0 0 0] true} {/_sanity/secret [] [] false}]) [recovered]
              panic: bad mutations size: 4 ([{/_sanity/key [118 97 108 117 101] [2 0 0 0 0 0 0 0] false} {/_sanity/key [110 101 119 32 118 97 108 117 101] [3 0 0 0 0 0 0 0] false} {/_sanity/secret [115 101 99 114 101 116] [4 0 0 0 0 0 0 0] true} {/_sanity/secret [] [] false}])
       
      goroutine 2446 [running]:
      testing.tRunner.func1.2({0x102d50ae0, 0x1400030d8a0})
              /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1526 +0x1c8
      testing.tRunner.func1()
              /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1529 +0x384
      panic({0x102d50ae0, 0x1400030d8a0})
              /opt/homebrew/Cellar/go/1.20.5/libexec/src/runtime/panic.go:884 +0x204
      github.com/couchbase/cbauth/metakv.doExecuteBasicSanityTest(0x1400030d280, 0x1400030d190)
              /Users/petersearby/Dev/server/master/goproj/src/github.com/couchbase/cbauth/metakv/sanity.go:136 +0xab8
      github.com/couchbase/cbauth/metakv.TestSanity(0x1400025b040)
              /Users/petersearby/Dev/server/master/goproj/src/github.com/couchbase/cbauth/metakv/metakv_test.go:295 +0x190
      testing.tRunner(0x1400025b040, 0x102de3b48)
              /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1576 +0x10c
      created by testing.(*T).Run
              /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1629 +0x368
      FAIL    github.com/couchbase/cbauth/metakv      0.880s
      FAIL
      

      Note that the 5th entry is observed, but not written to the buffer.

      Attachments

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

        Activity

          People

            Abhijeeth.Nuthan Abhijeeth Nuthan
            peter.searby Peter Searby
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty