Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBL App crashes during replication for system test #2187

Closed
hrajput89 opened this issue Jul 27, 2018 · 5 comments
Closed

CBL App crashes during replication for system test #2187

hrajput89 opened this issue Jul 27, 2018 · 5 comments
Labels
Milestone

Comments

@hrajput89
Copy link


  • Version: 2.1.0-223
  • Client OS: iOS
  • Server: CBS 5.5.0-2954

CBL app crashed with "EXC_BAD_ACCESS" while replication the changes after the delete docs on CBL App. The crash happened after the 87th iteration of System Test.

System test is running with initial 1M docs and perform update, delete and addition operation on the cluster with a combination such that after each iteration doc count remains 1M. The crash happened after the delete operation performed on CBL side.

screen shot 2018-07-27 at 10 53 01 am

Run System test with below command on feature/diff-cbl20-master

pytest -rsx -s --mode=cc --create-db-per-suite=suite_db --server-version=5.5.0-2954 --sync-gateway-version=2.1.0-121 --xattrs --liteserv-versions=2.1.0-223 --liteserv-hosts=localhost --liteserv-ports=8080 --liteserv-platforms=ios --use-views --timeout=864800 --no-db-delete testsuites/CBLTester/System_test_multiple_device/test_system_testing.py

CBL Python Client logs -
CBL python client log.log

SG logs are around 1GB. I've taken backup for them. Let me know if you need them.

@hrajput89
Copy link
Author

hrajput89 commented Jul 27, 2018

stack trace from the lldb shell

https://gist.github.com/hrajput89/0833c57285fbdf20831fd18774dd8f66

@snej
Copy link
Contributor

snej commented Jul 27, 2018

Crash is in CouchbaseLiteSwift.Replicator.Status.init(withStatus:).

@pasin
Copy link
Contributor

pasin commented Jul 27, 2018

I think the issue is that the CBLReplicator.status is not thread safe. When the swift replicator tired to access it, the status object has been released. We should me the status property thread safe anyway.

@djpongh djpongh added this to the 2.1.0 milestone Jul 30, 2018
pasin added a commit that referenced this issue Jul 31, 2018
…t API

* Made CBLReplicator.status property atomic (#2187)
* Changed CBLReplicator to use the dispatch queue from the CBLDatabase instead of using Main queue (#2127)
@pasin
Copy link
Contributor

pasin commented Jul 31, 2018

Please use RC4 - 2.1-239 to verify the fix. We can reopen the issue if the issue still exists.

@pasin pasin closed this as completed Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants