Panic: assignment to entry in nil map


#1

Hi,

Details of platforms:

syncgateway 1.2 enterprise edition
CBS 4.0 enterprise edition
android and ios sdk 1.2

sync gateway is stopping after

2016-04-23T12:06:52.623+05:30 WARNING: Error applying change from external bucket: 403 o t ne – db.(*Shadower).readTapFeed() at shadower.go:81
2016-04-23T12:06:52.632+05:30 Shadow+: Pulling “type”, CAS=1447afb73beb0000 … have UpstreamRev="", UpstreamCAS=0
panic: assignment to entry in nil map

i am rejecting doc is they don’t contain certain fields could that be the reason.

please find some logs below

2016-04-23T12:06:52.622+05:30 WARNING: Error applying change from external bucket: 403 o t ne – db.(*Shadower).readTapFeed() at shadower.go:81
2016-04-23T12:06:52.623+05:30 Shadow+: Pulling “YeaO1461076965-del”, CAS=1446c9c2a1a70000 … have UpstreamRev="", UpstreamCAS=0
2016-04-23T12:06:52.623+05:30 Shadow: Pulling “YeaO1461076965-del”, CAS=1446c9c2a1a70000 --> rev “1-7f15371d97d3dd77a80e93e17b3ff51f"
2016-04-23T12:06:52.623+05:30 CRUD+: Invoking sync on doc “YeaO1461076965-del” rev 1-7f15371d97d3dd77a80e93e17b3ff51f
2016-04-23T12:06:52.623+05:30 Sync fn rejected: new=map[type:upnx upid:YeaO1461076965 _rev:1-7f15371d97d3dd77a80e93e17b3ff51f _id:YeaO1461076965-del] old= --> 403 o t ne
2016-04-23T12:06:52.623+05:30 WARNING: Error applying change from external bucket: 403 o t ne – db.(*Shadower).readTapFeed() at shadower.go:81
2016-04-23T12:06:52.632+05:30 Shadow+: Pulling “type”, CAS=1447afb73beb0000 … have UpstreamRev=”", UpstreamCAS=0
panic: assignment to entry in nil map

goroutine 105 [running]:
github.com/couchbase/sync_gateway/db.(*Shadower).pullDocument.func1(0xc82317e820, 0x4, 0x0, 0x0)
/home/couchbase/jenkins/workspace/sync-gateway-unix-builds/0.0.0/enterprise/app-under-test/sync_gateway/src/github.com/couchbase/sync_gateway/db/shadower.go:123 +0x585
github.com/couchbase/sync_gateway/db.(*Database).updateDoc.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/couchbase/jenkins/workspace/sync-gateway-unix-builds/0.0.0/enterprise/app-under-test/sync_gateway/src/github.com/couchbase/sync_gateway/db/crud.go:480 +0x2d2
github.com/couchbase/sync_gateway/base.CouchbaseBucket.WriteUpdate.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc824705667, 0x0, 0x0)
/home/couchbase/jenkins/workspace/sync-gateway-unix-builds/0.0.0/enterprise/app-under-test/sync_gateway/src/github.com/couchbase/sync_gateway/base/bucket.go:118 +0x64
github.com/couchbase/go-couchbase.(*Bucket).WriteUpdate.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/couchbase/jenkins/workspace/sync-gateway-unix-builds/0.0.0/enterprise/app-under-test/sync_gateway/src/github.com/couchbase/go-couchbase/client.go:817 +0x7f

thanks
Arjun


#2

This sounds like a bug - can you file an issue at https://github.com/couchbase/sync_gateway/issues?


#3

ok doing it now. thanks