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

Statement hangs during execution

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Critical
    • 7.0.0
    • Cheshire-Cat
    • query
    • Untriaged
    • 1
    • Unknown

    Description

      If the statement timeout is too small statement hangs due to race condition

      During the launch of execution the timeout is too small execution tree closed without, really execution due to timeout. Looks like result channel  channel not closed due to race condition.

      You can see PhaseTimes no execution. phasseOperators has authorize only.

      Transactions statements inherit remaining transaction timeout reproducible. But it can happen for user timeout too.

       

      active_request entry
      {
              "elapsedTime": "57m26.476359472s",
              "executionTime": "57m26.476307434s",
              "node": "172.23.100.121:8091",
              "phaseOperators": {
                  "authorize": 1
              },
              "phaseTimes": {
                  "authorize": "300.296029ms",
                  "instantiate": "837.061µs",
                  "parse": "470.139283ms",
                  "plan": "6.532µs"
              },
              "preparedName": "ORDER_STATUS_getLastOrder",
              "preparedText": "PREPARE ORDER_STATUS_getLastOrder FROM SELECT O_ID, O_CARRIER_ID, O_ENTRY_D FROM default:default.tpcc.ORDERS WHERE O_W_ID = $1 AND O_D_ID = $2 AND O_C_ID = $3 ORDER BY O_ID DESC LIMIT 1",
              "remoteAddr": "172.23.100.129:35846",
              "requestId": "e164c8f9-d5e1-4104-8336-babc2b17c228",
              "requestTime": "2021-01-24T09:59:10.184-08:00",
              "scanConsistency": "unbounded",
              "state": "timeout",
              "statement": "EXECUTE ORDER_STATUS_getLastOrder",
              "transactionElapsedTime": "57m29.3158286s",
              "txid": "3d3e387f-4afa-4099-9e3a-26f5ed423492",
              "useCBO": true,
              "userAgent": "python-requests/2.24.0",
              "users": "Administrator"
          },
      

      goroutine 3126710 [chan receive, 55 minutes]:
      github.com/couchbase/query/server/http.(*httpRequest).Execute(0xc0000ec000, 0xc000d40000, 0xc047b24280, 0x24f51ea, 0x6, 0x27f2260, 0xc4de9c2bd0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/http/service_response.go:151 +0x50e
      github.com/couchbase/query/server.(*Server).serviceRequest(0xc000d40000, 0x28352a0, 0xc0000ec000)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/server.go:1036 +0x766
      github.com/couchbase/query/server.(*Server).handlePlusRequest(0xc000d40000, 0x28352a0, 0xc0000ec000, 0xc000d40080, 0xc000d400d0, 0x7)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/server.go:642 +0x13c
      github.com/couchbase/query/server.(*Server).PlusServiceRequest(0xc000d40000, 0x28352a0, 0xc0000ec000, 0x0)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/server.go:571 +0x85
      github.com/couchbase/query/server/http.(*HttpEndpoint).ServeHTTP(0xc000dc29a0, 0x27b40c0, 0xc04b14d0a0, 0xc04891c000)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/http/service_endpoint.go:265 +0x2ee
      github.com/gorilla/mux.(*Router).ServeHTTP(0xc000526300, 0x27b40c0, 0xc04b14d0a0, 0xc04c2fde00)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/server_build/gopkg/go-1.13.7/pkg/mod/github.com/gorilla/mux@v1.7.4/mux.go:210 +0xe2
      net/http.serverHandler.ServeHTTP(0xc000e96000, 0x27b40c0, 0xc04b14d0a0, 0xc04c2fde00)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.13.7/go/src/net/http/server.go:2802 +0xa4
      net/http.(*conn).serve(0xc01cffe0a0, 0x27c0300, 0xc01c785600)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.13.7/go/src/net/http/server.go:1890 +0x875
      created by net/http.(*Server).Serve
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.13.7/go/src/net/http/server.go:2928 +0x384
      
      

      Attachments

        1. active_requests
          9 kB
        2. godump
          392 kB

        Issue Links

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

          Activity

            People

              marco.greco Marco Greco (Inactive)
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty