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

Crashes when synchronizing in the background #1433

Closed
lucatorella opened this issue Sep 10, 2016 · 4 comments
Closed

Crashes when synchronizing in the background #1433

lucatorella opened this issue Sep 10, 2016 · 4 comments

Comments

@lucatorella
Copy link
Contributor

lucatorella commented Sep 10, 2016

I'm using background fetch to regularly synchronize the database in the background. Anyway I'm seeing sometimes some crashes. Is background fetch supposed to work?

This is one:

Crashed: Thread
SIGABRT ABORT 0x0000000182b4411c

0  libsystem_kernel.dylib         0x182b4411c __pthread_kill + 8
1  libsystem_pthread.dylib        0x182c10ef8 pthread_kill + 112
2  libsystem_c.dylib              0x182ab5dac abort + 140
3  libsystem_malloc.dylib         0x182b70374 szone_size + 522
4  MyApp                          0x100213088 btreeblk_free + 4297552008
5  MyApp                          0x10022ff2c _fdb_close + 14516
6  MyApp                          0x10022e984 fdb_check_file_reopen + 8972
7  MyApp                          0x10023c52c fdb_kvs_open + 23632
8  MyApp                          0x1001eff88 cbforest::Database::getKeyStore(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const (Error.hh:58)
9  MyApp                          0x1001f0268 cbforest::Database::updatePurgeCount() (Database.cc:220)
10 MyApp                          0x1001efcf0 cbforest::Database::compactionCallback(_fdb_file_handle*, unsigned int, char const*, fdb_doc_struct*, unsigned long long, unsigned long long, void*) (Database.cc:399)
11 MyApp                          0x1002336e8 _fdb_compact_file(_fdb_kvs_handle*, filemgr*, btreeblk_handle*, docio_handle*, hbtrie*, hbtrie*, btree*, btree*, unsigned long long, bool) + 28784
12 MyApp                          0x100231e44 fdb_compact_file + 22476
13 MyApp                          0x10021ea10 compactor_thread(void*) + 18468
14 libsystem_pthread.dylib        0x182c0fb28 _pthread_body + 156
15 libsystem_pthread.dylib        0x182c0fa8c _pthread_body + 154
16 libsystem_pthread.dylib        0x182c0d028 thread_start + 4

This is another one:

#11. Crashed: com.MyCompany.MyApp.couchbase
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000028

0  MyApp                          0x1002cc7b4 list_pop_front + 316
1  MyApp                          0x1002b33c0 _btreeblk_read(void*, unsigned long long, int) + 4297143232
2  MyApp                          0x1002d7020 btree_init_from_bid + 1860
3  MyApp                          0x1002cec18 fdb_sync_db_header + 9632
4  MyApp                          0x1002b3874 fdb_begin_transaction + 4297144436
5  MyApp                          0x1002904b0 cbforest::Database::beginTransaction(cbforest::Transaction*) (Database.cc:283)
6  MyApp                          0x1002906fc cbforest::Transaction::Transaction(cbforest::Database*) (Database.cc:325)
7  MyApp                          0x100298c38 cbforest::MapReduceIndexer::addIndex(cbforest::MapReduceIndex*) (MapReduceIndex.cc:324)
8  MyApp                          0x1002ab034 c4indexer_begin (c4View.cc:265)
9  MyApp                          0x10028a2a0 -[CBL_ForestDBViewStorage updateIndexes:] (CBL_ForestDBViewStorage.mm:339)
10 MyApp                          0x1003140b0 -[CBLView updateIndexes:] (CBLView.m:287)
11 MyApp                          0x100313c48 -[CBLView _updateIndex] (CBLView.m:258)
12 MyApp                          0x10033dd44 -[CBLDatabase(Views) queryViewNamed:options:ifChangedSince:status:] (CBLQuery.m:488)
13 MyApp                          0x10033c644 -[CBLQuery run:] (CBLQuery.m:219)
14 MyApp                          0x100274af8 specialized Indexer.(updateConfig(StorageConfig) -> ()).(closure #1) (Indexer.swift:123)
15 libdispatch.dylib              0x1829f54bc _dispatch_call_block_and_release + 24
16 libdispatch.dylib              0x1829f547c _dispatch_client_callout + 16
17 libdispatch.dylib              0x182a014c0 _dispatch_queue_drain + 864
18 libdispatch.dylib              0x1829f8f80 _dispatch_queue_invoke + 464
19 libdispatch.dylib              0x182a03390 _dispatch_root_queue_drain + 728
20 libdispatch.dylib              0x182a030b0 _dispatch_worker_thread3 + 112
21 libsystem_pthread.dylib        0x182c0d470 _pthread_wqthread + 1092
22 libsystem_pthread.dylib        0x182c0d020 start_wqthread + 4

Version: 1.2.2
Client OS: iOS 9.3.2
Server: couchDB

@basememara
Copy link

Duplicate but critical: #1422

@snej
Copy link
Contributor

snej commented Sep 15, 2016

It definitely seems that this is caused by iOS file protection refusing access to the file, but of course this shouldn't be triggering crashes inside ForestDB. I think the file errors may be triggering some edge cases there.

@snej
Copy link
Contributor

snej commented Sep 15, 2016

Filed a bug report against ForestDB: MB-20944.

@jayahariv
Copy link
Contributor

Closing 1.x issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants