"I found a deadlock that I was able to trace back to the `Bootstrap` function:
```
goroutine 2470 [chan receive (nil chan), 156 minutes]:
github.com/couchbase/gocbcore/v9.(*memdClient).Bootstrap(0xc000570c40, 0xc000edb6e0, 0x1baf1d0, 0x7, 0x1bb5d00, 0xb, 0xc000482e10, 0x3, 0x3, 0xc0009f72c0, ...)
external/com_github_couchbase_gocbcore_v9/memdclient.go:750 +0xeff
github.com/couchbase/gocbcore/v9.(*memdClientDialerComponent).SlowDialMemdClient(0xc00020f320, 0xc000edb6e0, 0xc0005be870, 0x30, 0xc000efb3d0, 0x3, 0x1, 0x1c04bc9)
external/com_github_couchbase_gocbcore_v9/memdclientdialer_component.go:98 +0x3e5
github.com/couchbase/gocbcore/v9.(*kvMux).newKVMuxState.func1(0xc000edb6e0, 0x2, 0x2, 0xc0007703c0)
external/com_github_couchbase_gocbcore_v9/kvmux.go:545 +0x9d
github.com/couchbase/gocbcore/v9.(*memdPipelineClient).Run.func1(0xc0000b5d10, 0xc000c58c00, 0xc000c58c60)
external/com_github_couchbase_gocbcore_v9/memdpipelineclient.go:220 +0x38
created by github.com/couchbase/gocbcore/v9.(*memdPipelineClient).Run
external/com_github_couchbase_gocbcore_v9/memdpipelineclient.go:219 +0x28d
```
I found that after profiling the goroutines, when I was investigating this error (result of enalbing the verbose logs in `gocb` package with `gocb.SetLogger(gocb.VerboseStdioLogger())`):
```
GOCB 23:14:36.745572 ???:0: Orphaned responses observed:
{"service":"kv","count":1,"top":[
{"c":"3c4354d070ecd8c1/8c13f620c6c0a62c","i":"0x5","r":"<<REDACTED>>:11210","d":145,"s":"kv:CMD_SASLSTEP"}
]}
```
In summary, the context where I found this issue, was in a case where I had to initialize/create a `gocb.Cluster` client multiple times (as I can't take the server for granted), and after some long period of time, this deadlock happens.
I have tested these changes for that scenario and was able to solve it.
Obs(1): Currently I'm using `v9.1.5` version of this package and the server `6.5.0` (enterprise);
Obs(2): I have an internal ticket that I can share with all the details that lead to this change and the troubleshooting process with all the behaviors observed;"
"I found a deadlock that I was able to trace back to the `Bootstrap` function:
```
goroutine 2470 [chan receive (nil chan), 156 minutes]:
github.com/couchbase/gocbcore/v9.(*memdClient).Bootstrap(0xc000570c40, 0xc000edb6e0, 0x1baf1d0, 0x7, 0x1bb5d00, 0xb, 0xc000482e10, 0x3, 0x3, 0xc0009f72c0, ...)
external/com_github_couchbase_gocbcore_v9/memdclient.go:750 +0xeff
github.com/couchbase/gocbcore/v9.(*memdClientDialerComponent).SlowDialMemdClient(0xc00020f320, 0xc000edb6e0, 0xc0005be870, 0x30, 0xc000efb3d0, 0x3, 0x1, 0x1c04bc9)
external/com_github_couchbase_gocbcore_v9/memdclientdialer_component.go:98 +0x3e5
github.com/couchbase/gocbcore/v9.(*kvMux).newKVMuxState.func1(0xc000edb6e0, 0x2, 0x2, 0xc0007703c0)
external/com_github_couchbase_gocbcore_v9/kvmux.go:545 +0x9d
github.com/couchbase/gocbcore/v9.(*memdPipelineClient).Run.func1(0xc0000b5d10, 0xc000c58c00, 0xc000c58c60)
external/com_github_couchbase_gocbcore_v9/memdpipelineclient.go:220 +0x38
created by github.com/couchbase/gocbcore/v9.(*memdPipelineClient).Run
external/com_github_couchbase_gocbcore_v9/memdpipelineclient.go:219 +0x28d
```
I found that after profiling the goroutines, when I was investigating this error (result of enalbing the verbose logs in `gocb` package with `gocb.SetLogger(gocb.VerboseStdioLogger())`):
```
GOCB 23:14:36.745572 ???:0: Orphaned responses observed:
{"service":"kv","count":1,"top":[
{"c":"3c4354d070ecd8c1/8c13f620c6c0a62c","i":"0x5","r":"<<REDACTED>>:11210","d":145,"s":"kv:CMD_SASLSTEP"}]}
```
In summary, the context where I found this issue, was in a case where I had to initialize/create a `gocb.Cluster` client multiple times (as I can't take the server for granted), and after some long period of time, this deadlock happens.
I have tested these changes for that scenario and was able to solve it.
Obs(1): Currently I'm using `v9.1.5` version of this package and the server `6.5.0` (enterprise);
Obs(2): I have an internal ticket that I can share with all the details that lead to this change and the troubleshooting process with all the behaviors observed;"