couchbase / sync_gateway

Manages access and synchronization between Couchbase Lite and Couchbase Server
https://www.couchbase.com/products/sync-gateway
Other
447 stars 138 forks source link

Startup panic when connnecting to Couchbase Server directly after restart #2716

Closed tleyden closed 7 years ago

tleyden commented 7 years ago

I ran into this while testing https://github.com/couchbase/sync_gateway/issues/2681

Sync Gateway version

d0fc22384e915f73d30d2aabb96defde5c4b8181 (feature/issue_2681_409_conflicts_deletes_rebased branch)

Operating system

Centos7 / Docker

Log output

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x69ff9b]

goroutine 119 [running]:
panic(0xae2140, 0xc42000e040)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
gopkg.in/couchbase/gocbcore%2ev7.(*Agent).Stats.func2(0x0, 0xc4201f0000, 0xf58c20, 0x10e2220)
    /Users/tleyden/Development/sync_gateway/godeps/src/gopkg.in/couchbase/gocbcore.v7/agentops_crud.go:531 +0x23b
gopkg.in/couchbase/gocbcore%2ev7.(*memdQRequest).tryCallback(0xc4201f0000, 0x0, 0xf58c20, 0x10e2220, 0x1)
    /Users/tleyden/Development/sync_gateway/godeps/src/gopkg.in/couchbase/gocbcore.v7/memdqpackets.go:57 +0x85
gopkg.in/couchbase/gocbcore%2ev7.(*memdClient).run.func2.1(0xc4201f0000)
    /Users/tleyden/Development/sync_gateway/godeps/src/gopkg.in/couchbase/gocbcore.v7/memdclient.go:184 +0x4c

More logs

Steps to reproduce

  1. I'm running this script to restart couchbase server followed by sync gateway directly afterwards
tleyden commented 7 years ago

Filed https://issues.couchbase.com/browse/GOCBC-219 since the panic is coming from gocb.

tleyden commented 7 years ago

TODO:

tleyden commented 7 years ago

Already uptook gocb changes: