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

sort package may return without waiting for children

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0, 4.1.0, 4.5.0, 4.5.1, 4.6.0, 4.6.2, 4.6.1, 4.6.3, 5.0.0, 5.1.0
    • 4.6.4, 5.1.0, 5.5.0
    • query
    • Untriaged
    • No

    Description

      Under certain circumstances, the sort package will panic with the following stack

      panic: send on closed channel
       
      goroutine 3562486 [running]:
      runtime.gopanic(0xc7a520, 0xc237379b00)
              /usr/local/go/src/runtime/panic.go:425 +0x2a3 fp=0xc24dc91e50 sp=0xc24dc91de8
      runtime.chansend(0xc7bc20, 0xc22ad90960, 0xc24dc91f4f, 0x1405801, 0xadfa5a, 0x8)
              /usr/local/go/src/runtime/chan.go:131 +0x1a3 fp=0xc24dc91ef8 sp=0xc24dc91e50
      runtime.chansend1(0xc7bc20, 0xc22ad90960, 0xc24dc91f4f)
              /usr/local/go/src/runtime/chan.go:68 +0x43 fp=0xc24dc91f30 sp=0xc24dc91ef8
      github.com/couchbase/query/sort.notify(0xc22ad90960)
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/query/sort/sort.go:214 +0x4a fp=0xc24dc91f58 sp=0xc24dc91f30
      github.com/couchbase/query/sort.quickSort(0x7f252c60d350, 0xc20a80ab00, 0x203, 0x20a, 0xc, 0xc22ad90960)
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/query/sort/sort.go:210 +0x314 fp=0xc24dc91fb0 sp=0xc24dc91f58
      runtime.goexit()
              /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc24dc91fb8 sp=0xc24dc91fb0
      created by github.com/couchbase/query/sort.quickSort
              /home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/query/sort/sort.go:193 +0x248
      

      Attachments

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

        Activity

          marco.greco Marco Greco added a comment - - edited

          Fixed in master with change 83040. Awaiting for watson approval.

          marco.greco Marco Greco added a comment - - edited Fixed in master with change 83040. Awaiting for watson approval.

          Build 5.1.0-1160 contains query commit 1e0b0fe3a667cb177bbae04f0a61d87ae9593275 with commit message:
          MB-25900 MB-25901 avoid panics on order bys
          https://github.com/couchbase/query/commit/1e0b0fe3a667cb177bbae04f0a61d87ae9593275

          build-team Couchbase Build Team added a comment - Build 5.1.0-1160 contains query commit 1e0b0fe3a667cb177bbae04f0a61d87ae9593275 with commit message: MB-25900 MB-25901 avoid panics on order bys https://github.com/couchbase/query/commit/1e0b0fe3a667cb177bbae04f0a61d87ae9593275

          Build 4.6.4-4536 contains query commit 11860b316e01d389a0ac4127fddf55675aaea606 with commit message:
          MB-25900 MB-25901 avoid panics on order bys
          https://github.com/couchbase/query/commit/11860b316e01d389a0ac4127fddf55675aaea606

          build-team Couchbase Build Team added a comment - Build 4.6.4-4536 contains query commit 11860b316e01d389a0ac4127fddf55675aaea606 with commit message: MB-25900 MB-25901 avoid panics on order bys https://github.com/couchbase/query/commit/11860b316e01d389a0ac4127fddf55675aaea606

          Build 5.0.1-4685 contains query commit b5e71f441cd40bf0bf9f07ca76c5fa752e73f7f0 with commit message:
          MB-25900 MB-25901 avoid panics on order bys
          https://github.com/couchbase/query/commit/b5e71f441cd40bf0bf9f07ca76c5fa752e73f7f0

          build-team Couchbase Build Team added a comment - Build 5.0.1-4685 contains query commit b5e71f441cd40bf0bf9f07ca76c5fa752e73f7f0 with commit message: MB-25900 MB-25901 avoid panics on order bys https://github.com/couchbase/query/commit/b5e71f441cd40bf0bf9f07ca76c5fa752e73f7f0
          marco.greco Marco Greco added a comment -

          merged in 3 codelines

          marco.greco Marco Greco added a comment - merged in 3 codelines

          Marco Greco
          Can you please give the verification steps here?

          Prerna.Manaktala Prerna Manaktala (Inactive) added a comment - Marco Greco Can you please give the verification steps here?
          marco.greco Marco Greco added a comment -

          This is not easy to repro at all - I have found no way other than via placing instrumenting code.
          It depends on the items a sort child still has to sort, which is not predictable, and timing, for good measure.
          I think you should just close it.

          marco.greco Marco Greco added a comment - This is not easy to repro at all - I have found no way other than via placing instrumenting code. It depends on the items a sort child still has to sort, which is not predictable, and timing, for good measure. I think you should just close it.

          People

            Prerna.Manaktala Prerna Manaktala (Inactive)
            marco.greco Marco Greco
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty