couchbase / couchbase-lite-ios

Lightweight, embedded, syncable NoSQL database engine for iOS and MacOS apps.
Apache License 2.0
1.62k stars 297 forks source link

Received unexpected rev crash #300

Closed sellingsolutions closed 10 years ago

sellingsolutions commented 10 years ago

17:00:59.436‖ WARNING* : CBL_Puller Received unexpected rev {1843AC66-0A77-4725-B81F-37725F960A8E #1-4ea22ec4dc08748ac06cd092a7ca9916} 17:00:59.437‖ WARNING* : CBL_Puller: Received unexpected rev {895a9227-135a-45c5-b0e3-636a7e719770 #1-91e1ba13609013fc91e8939a363b8fda} 17:00:59.437‖ WARNING* : CBL_Puller Received unexpected rev {67bb21c7-739b-43f9-9da9-ef24099650c5 #1-5fbdeb8181cd0254033e83de1d7adb59} 17:00:59.437‖ WARNING* : CBL_Puller Received unexpected rev {57F995F8-961E-4F60-84F4-BCE62A194B2A #1-c03172fa6796881a2b259d5418016bc6} 17:00:59.438‖ WARNING* : CBL_Puller Received unexpected rev {9463B25A-B740-48AF-958D-541BC1DAD55A #1-5af6016d806608d69b115d5e852ef412} 2014-04-01 17:00:59.438 iSpect[44369:3503] * ASSERTION FAILED: Invalid sequence 0 (latest is 1374) 2014-04-01 17:00:59.438 iSpect[44369:3503] *\ Assertion failure in -[CBLSequenceMap removeSequence:](), /Users/couchbase/jenkins/workspace/build_cblite_ios_stable/couchbase-lite-ios/Source/CBLSequenceMap.m:45

thread backtrace: http://pastebin.com/77MdvhR5

snej commented 10 years ago

What versions/revisions of CBL and the gateway?

sellingsolutions commented 10 years ago

latest master on sync_gateway and beta 3 on cblite

snej commented 10 years ago

Try updating Couchbase Lite to b3.1; there were some important fixes.

snej commented 10 years ago

Notes: The "Received unexpected rev" warning is from CBL_Puller.m:483. It happens if the response to a _bulk_get request contains a revision that isn't one that was asked for. So either the gateway screwed up and returned the wrong revision, or CBL_Puller isn't identifying it correctly. Weird.

tleyden commented 10 years ago

A network trace should be able to isolate whether the gateway is screwing up and returning the wrong revision.

snej commented 10 years ago

Or just turning on “SyncVerbose” logging in CBL. But it sounds like this is intermittent so it may be hard to capture.

It does look as though when CBL receives an unexpected revision it should just ignore it — the crash came later on during processing such a revision. I can fix that easily.

jessliu commented 10 years ago

Hi @sellingsolutions as we have not heard back in some time and this issue was based off of an old Beta, we are closing out this issue. If you have any additional information that could help us reproduce this in 1.0.0, please add and re-open.