{"action":"created","issue":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/758","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/758/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/758/comments","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/758/events","html_url":"https://github.com/couchbase/couchbase-lite-ios/issues/758","id":85593603,"number":758,"title":"CBL 1.1 Mac: Stopping continuous replication consistently triggers timeout warning","user":{"login":"mdfw","id":1081338,"avatar_url":"https://avatars.githubusercontent.com/u/1081338?v=3","gravatar_id":"","url":"https://api.github.com/users/mdfw","html_url":"https://github.com/mdfw","followers_url":"https://api.github.com/users/mdfw/followers","following_url":"https://api.github.com/users/mdfw/following{/other_user}","gists_url":"https://api.github.com/users/mdfw/gists{/gist_id}","starred_url":"https://api.github.com/users/mdfw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdfw/subscriptions","organizations_url":"https://api.github.com/users/mdfw/orgs","repos_url":"https://api.github.com/users/mdfw/repos","events_url":"https://api.github.com/users/mdfw/events{/privacy}","received_events_url":"https://api.github.com/users/mdfw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/labels/f:%20Replication","name":"f: Replication","color":"f8e100"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/milestones/14","html_url":"https://github.com/couchbase/couchbase-lite-ios/milestones/1.1.1","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/milestones/14/labels","id":1172808,"number":14,"title":"1.1.1","description":"Small bug-fix update to 1.1","creator":{"login":"snej","id":43241,"avatar_url":"https://avatars.githubusercontent.com/u/43241?v=3","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":38,"state":"open","created_at":"2015-06-19T17:52:10Z","updated_at":"2015-07-30T16:38:12Z","due_on":"2015-07-31T07:00:00Z","closed_at":null},"comments":27,"created_at":"2015-06-05T17:58:30Z","updated_at":"2015-07-30T22:56:11Z","closed_at":"2015-06-11T03:17:07Z","body":"I'm running replications from/to CBL Mac to CouchDB (Cloudant hosted). While testing this bug, the push and pull replications are **not** running concurrently, but at separate times.\r\n\r\nAfter updating to CBL 1.1 (built it myself from commit: 7949e8d59b9b30f7711be47a121dfbda9c82f2a8 on Yosemite, Xcode 6.3.2) . I'm consistently (every time) getting this warning when I stop a continuous replication:\r\n> WARNING: CBLReplication[to https://server/db]: Timeout waiting for background stop notification\r\nor\r\n> WARNING: CBLReplication[from https://server/db]: Timeout waiting for background stop notification\r\n\r\nI don't remember ever seeing this warning on 1.0.x but to be honest, I've just started working with replications so it's possible I just didn't run into it. I may roll back and see if it's there.\r\n\r\n*Steps to reproduce:*\r\n1. Create a CBL database\r\n2. Add a replication (`[db createPushReplication:url]`)\r\n3. Call `[self.pushreplication start]`\r\n4. After it drops to idle state, call `[self.pushreplication stop]`\r\n\r\n*Expected behavior:* no warnings. \r\n\r\n*Note:* The replication does appear to actually shut down and stop before or after the warning - it's hard to tell.\r\n\r\n*Note2:* I don't see this on one-shot replications.\r\n\r\n*Related:* It seems after I call stop, a replication runs again? To debug I attached a filter that just logs when the replication runs and returns `YES`. It seems that after the call to `[replication stop]` the replication runs again. Is this correct behavior?"},"comment":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/comments/126514294","html_url":"https://github.com/couchbase/couchbase-lite-ios/issues/758#issuecomment-126514294","issue_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/758","id":126514294,"user":{"login":"pasin","id":801454,"avatar_url":"https://avatars.githubusercontent.com/u/801454?v=3","gravatar_id":"","url":"https://api.github.com/users/pasin","html_url":"https://github.com/pasin","followers_url":"https://api.github.com/users/pasin/followers","following_url":"https://api.github.com/users/pasin/following{/other_user}","gists_url":"https://api.github.com/users/pasin/gists{/gist_id}","starred_url":"https://api.github.com/users/pasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasin/subscriptions","organizations_url":"https://api.github.com/users/pasin/orgs","repos_url":"https://api.github.com/users/pasin/repos","events_url":"https://api.github.com/users/pasin/events{/privacy}","received_events_url":"https://api.github.com/users/pasin/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T22:56:11Z","updated_at":"2015-07-30T22:56:11Z","body":"Yes, you are right. Thread#3 has an exception. Thanks for pointing that out. A couple of things here:\r\n\r\n1. Look like there are 2 threads (#1 at replicationProgressGateway and #3 at replicationProgressP2p) trying to stop the replicator at the same time. For a quick workaround, you may either calling the stop only once or you can wrap inside the -stopP2P method with a dispatch queue (to main queue).\r\n\r\n2. From your latest screenshot, those are symbols that didn't get renamed. Could you try to add those into Source/Support/CouchbaseLitePrefix.h and rebuild the binary (If it works, could you please submit a PR)? or Could you give me the whole list of duplicate symbols so I can add them for you (From the screenshot above, I couldn't see a couple symbols)? Thanks!"}}