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

during connection protect read and write with timeout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.2, 6.0.0, 6.5.0
    • 6.5.0
    • query
    • None

    Description

      While making connections cbq-egine trying to establish handshake packet exchange with Data node and The data node did not sent anything.
      It is waiting for socket read forever. Protect this with timeout

      go-couchbase/conn_pool.go
      defaultMkConn()

      if len(features) > 0 {
                      if DefaultTimeout > 0 {
                              conn.SetDeadline(getDeadline(noDeadline, DefaultTimeout))
                      }
       
                      res, err := conn.EnableFeatures(features)
       
                      if DefaultTimeout > 0 {
                              conn.SetDeadline(noDeadline)
                      }
                      if err != nil || res.Status != gomemcached.SUCCESS {
                              logging.Warnf("Unable to enable features %v", err)
                      }
              }
       
      
      

      goroutine 14 [IO wait, 11036 minutes]:
      net.runtime_pollWait(0x7fe1cdd11b40, 0x72, 0x2ab)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.8.5/go/src/runtime/netpoll.go:164 +0x59
      net.(*pollDesc).wait(0xc74129ffe8, 0x72, 0x188f7e0, 0x1885c80)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.8.5/go/src/net/fd_poll_runtime.go:75 +0x38
      net.(*pollDesc).waitRead(0xc74129ffe8, 0xc7bc217d20, 0x18)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.8.5/go/src/net/fd_poll_runtime.go:80 +0x34
      net.(*netFD).Read(0xc74129ff80, 0xc7bc217d20, 0x18, 0x18, 0x0, 0x188f7e0, 0x1885c80)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.8.5/go/src/net/fd_unix.go:250 +0x1b7
      net.(*conn).Read(0xc44b54a168, 0xc7bc217d20, 0x18, 0x18, 0x0, 0x0, 0x0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.8.5/go/src/net/net.go:181 +0x70
      io.ReadAtLeast(0x7fe2208de038, 0xc44b54a168, 0xc7bc217d20, 0x18, 0x18, 0x18, 0x60, 0x60, 0xf07dc0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.8.5/go/src/io/io.go:307 +0xa9
      io.ReadFull(0x7fe2208de038, 0xc44b54a168, 0xc7bc217d20, 0x18, 0x18, 0xc421582000, 0x7fe2209bec20, 0x0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.8.5/go/src/io/io.go:325 +0x58
      github.com/couchbase/gomemcached.(*MCResponse).Receive(0xc45157d7a0, 0x7fe2208de038, 0xc44b54a168, 0xc7bc217d20, 0x18, 0x18, 0x0, 0x0, 0x0)
              godeps/src/github.com/couchbase/gomemcached/mc_res.go:162 +0xc6
      github.com/couchbase/gomemcached/client.getResponse(0x7fe2208de038, 0xc44b54a168, 0xc7bc217d20, 0x18, 0x18, 0x448133, 0xc496c82ed0, 0xc517709728, 0x413528)
              godeps/src/github.com/couchbase/gomemcached/client/transport.go:35 +0x90
      github.com/couchbase/gomemcached/client.(*Client).Send(0xc479a60cc0, 0xc562bf1600, 0xb, 0xc496c82ed0, 0xb)
              godeps/src/github.com/couchbase/gomemcached/client/mc.go:162 +0xad
      github.com/couchbase/gomemcached/client.(*Client).EnableFeatures(0xc479a60cc0, 0xc496c82ec0, 0x2, 0x4, 0x1, 0xc496c82ec0, 0x0)
              godeps/src/github.com/couchbase/gomemcached/client/mc.go:268 +0x206
      github.com/couchbase/go-couchbase.defaultMkConn(0xc420ab3d40, 0x35, 0x1889820, 0xc4216a9d40, 0xc517709900, 0x42d366, 0xc)
              godeps/src/github.com/couchbase/go-couchbase/conn_pool.go:96 +0x476
      github.com/couchbase/go-couchbase.(*connectionPool).GetWithTimeout(0xc4216aa600, 0x9356907420000, 0x0, 0x0, 0x0)
              godeps/src/github.com/couchbase/go-couchbase/conn_pool.go:210 +0x649
      github.com/couchbase/go-couchbase.(*connectionPool).Get(0xc4216aa600, 0x8, 0xc4216aa600, 0xc4216aa540)
              godeps/src/github.com/couchbase/go-couchbase/conn_pool.go:225 +0x37
      github.com/couchbase/go-couchbase.(*Bucket).doBulkGet.func1(0xc4200ae380, 0x8, 0xc42083d0c8, 0x6, 0xc611eeb6e0, 0xc517709d68, 0xed3201270, 0x33e25fd, 0x1906660, 0x2cb, ...)
              godeps/src/github.com/couchbase/go-couchbase/client.go:322 +0x7b
      github.com/couchbase/go-couchbase.(*Bucket).doBulkGet(0xc4200ae380, 0xfd02cb, 0xc481263400, 0x1, 0x10, 0xed3201270, 0x33e25fd, 0x1906660, 0xc611eeb680, 0xc611eeb6e0, ...)
      
      

      Attachments

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

        Activity

          People

            ritam.sharma Ritam Sharma
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                PagerDuty