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

Bad Version Exception when delivering change notifications #4660

Closed
jpsim opened this issue Feb 13, 2017 · 8 comments
Closed

Bad Version Exception when delivering change notifications #4660

jpsim opened this issue Feb 13, 2017 · 8 comments

Comments

@jpsim
Copy link
Contributor

jpsim commented Feb 13, 2017

This appears to be a slightly different issue than #4144. Caught with Realm 2.4.2. Backtrace:

frame #0: 0x00000001060d9381 Augury - Dev`::__cxa_throw(void *, std::type_info *, void (*)(void *)) [inlined] _dispatch_once(block=<unavailable>) block_pointer) at once.h:67 [opt]
    frame #1: 0x00000001060d9381 Augury - Dev`::__cxa_throw(exception_object=0x00006080001146b8, tinfo=0x0000000106513000, dest=(Augury - Dev`realm::LogicError::~LogicError()))(void *)) + 20 at BGSCXXException.mm:58 [opt]
  * frame #2: 0x0000000105e8132c Augury - Dev`void realm::SharedGroup::advance_read<(anonymous namespace)::TransactLogValidator>(this=0x00007f84e211cc00, observer=0x0000700009570e88, version_id=(version = 8, index = 7))::TransactLogValidator*, realm::VersionID) + 220 at group_shared.hpp:938
    frame #3: 0x0000000105e8123b Augury - Dev`void realm::_impl::SharedGroupFriend::advance_read<(anonymous namespace)::TransactLogValidator>(sg=0x00007f84e211cc00, obs=0x0000700009570e88, ver=(version = 8, index = 7))::TransactLogValidator*, realm::VersionID) + 59 at group_shared.hpp:1109
    frame #4: 0x0000000105e6cb4b Augury - Dev`void realm::LangBindHelper::advance_read<(anonymous namespace)::TransactLogValidator>(sg=0x00007f84e211cc00, observer=0x0000700009570e88, version=(version = 8, index = 7))::TransactLogValidator&&, realm::VersionID) + 59 at lang_bind_helper.hpp:335
    frame #5: 0x0000000105e6cb01 Augury - Dev`realm::_impl::transaction::advance(sg=0x00007f84e211cc00, (null)=0x0000000000000000, version=(version = 8, index = 7)) + 113 at transact_log_handler.cpp:685
    frame #6: 0x0000000105bfbdc5 Augury - Dev`(anonymous namespace)::IncrementalChangeInfo::advance_to_final(this=0x00007000095716f0, version=(version = 8, index = 7)) + 117 at realm_coordinator.cpp:516
    frame #7: 0x0000000105bf9c43 Augury - Dev`realm::_impl::RealmCoordinator::run_async_notifiers(this=0x00007f84e0c0f420) + 7363 at realm_coordinator.cpp:648
    frame #8: 0x0000000105bf7d05 Augury - Dev`realm::_impl::RealmCoordinator::on_change(this=0x00007f84e0c0f420) + 37 at realm_coordinator.cpp:459
    frame #9: 0x0000000105bad2ff Augury - Dev`realm::_impl::ExternalCommitHelper::listen(this=0x00006000000571f0) + 735 at external_commit_helper.cpp:217
    frame #10: 0x0000000105bae177 Augury - Dev`realm::_impl::ExternalCommitHelper::ExternalCommitHelper(this=0x0000600000132dd0)::$_0::operator()() const + 23 at external_commit_helper.cpp:159
    frame #11: 0x0000000105bae14d Augury - Dev`_ZNSt3__112__async_funcIZN5realm5_impl20ExternalCommitHelperC1ERNS2_16RealmCoordinatorEE3$_0JEE9__executeIJEEEvNS_15__tuple_indicesIJXspT_EEEE [inlined] std::__1::__invoke<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>(__f=0x0000600000132dd0)::$_0>(fp)(std::__1::forward<>(fp0))), realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0&&) + 61 at __functional_base:416
    frame #12: 0x0000000105bae13c Augury - Dev`_ZNSt3__112__async_funcIZN5realm5_impl20ExternalCommitHelperC1ERNS2_16RealmCoordinatorEE3$_0JEE9__executeIJEEEvNS_15__tuple_indicesIJXspT_EEEE(this=0x0000600000132dd0, (null)=__tuple_indices<> @ 0x0000700009572c20) + 44 at future:2348
    frame #13: 0x0000000105bae105 Augury - Dev`std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>::operator(this=0x0000600000132dd0)() + 21 at future:2341
    frame #14: 0x0000000105bae02f Augury - Dev`std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::__execute(this=0x0000600000132d40) + 31 at future:1031
    frame #15: 0x0000000105baeaa4 Augury - Dev`std::__1::__thread_proxy<std::__1::tuple<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(void*, void*) [inlined] std::__1::__invoke<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*, void>(__f=0x00006000000330c0, __a0=0x00006000000330d0)::$_0> >*>(fp0)).*fp(std::__1::forward<>(fp1))), void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*&&) + 127 at __functional_base:383
    frame #16: 0x0000000105baea25 Augury - Dev`std::__1::__thread_proxy<std::__1::tuple<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(void*, void*) [inlined] _ZNSt3__116__thread_executeIMNS_19__async_assoc_stateIvNS_12__async_funcIZN5realm5_impl20ExternalCommitHelperC1ERNS4_16RealmCoordinatorEE3$_0JEEEEEFvvEJPSA_EJLm1EEEEvRNS_5tupleIJT_DpT0_EEENS_15__tuple_indicesIJXspT1_EEEE(__t=0x00006000000330c0) + 40 at thread:347
    frame #17: 0x0000000105bae9fd Augury - Dev`std::__1::__thread_proxy<std::__1::tuple<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(__vp=0x00006000000330c0) + 365 at thread:357
    frame #18: 0x000000010d68daab libsystem_pthread.dylib`_pthread_body + 180
    frame #19: 0x000000010d68d9f7 libsystem_pthread.dylib`_pthread_start + 286
    frame #20: 0x000000010d68d1fd libsystem_pthread.dylib`thread_start + 13`

Re-posted from #4144 (comment).

@jpsim
Copy link
Contributor Author

jpsim commented Feb 13, 2017

@sblepa could you please share more information about this crash? Short of a full Xcode project that we can run to trigger the exception, it'd be useful to know what the contents of your notification block is, including the query or object being observed. Thanks.

@sblepa
Copy link

sblepa commented Feb 14, 2017

@jpsim Thanks for the reply, unfortunately I can't share my project code here, also I can't reproduce it manually, it happens randomly (although it happens most when I go into a certain screen in the app).

What is much more worrying and I think is a side effect of this issue, is sometimes after I get the BadVersion, I get stuck in a lock waiting for a Realm transaction to start, this happens on the main thread which causes the main thread to stop responding, and it never gets released, this is also something I can't reproduce manually but happens quite a lot in the current version, I'll paste here the stack trance of all threads when it gets stuck:

* thread #1: tid = 0x3a120, 0x1b538810 libsystem_kernel.dylib`__psynch_cvwait + 24, stop reason = signal SIGSTOP
    frame #0: 0x1b538810 libsystem_kernel.dylib`__psynch_cvwait + 24
    frame #1: 0x1b5ecd2e libsystem_pthread.dylib`_pthread_cond_wait + 542
    frame #2: 0x1b5ee0be libsystem_pthread.dylib`pthread_cond_wait + 38
    frame #3: 0x1af8837e libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 118
    frame #4: 0x00457b5a Augury - Dev`void std::__1::condition_variable::wait<std::__1::unique_lock<std::__1::mutex> realm::_impl::RealmCoordinator::wait_for_notifiers<realm::_impl::NotifierPackage::package_and_wait(realm::util::Optional<unsigned long long>)::$_11>(realm::_impl::NotifierPackage::package_and_wait(realm::util::Optional<unsigned long long>)::$_11&&)::'lambda'()>(this=0x14fcbbe0, __lk=0x0160d064, __pred=(anonymous class) @ 0x0160ce8c)::$_11) + 50 at __mutex_base:345
    frame #5: 0x00452b86 Augury - Dev`std::__1::unique_lock<std::__1::mutex> realm::_impl::RealmCoordinator::wait_for_notifiers<realm::_impl::NotifierPackage::package_and_wait(this=0x14fcbaf0, wait_predicate=0x0160d05c)::$_11>(realm::_impl::NotifierPackage::package_and_wait(realm::util::Optional<unsigned long long>)::$_11&&) + 206 at realm_coordinator.hpp:175
    frame #6: 0x0045273a Augury - Dev`realm::_impl::NotifierPackage::package_and_wait(this=0x0160d564, target_version=<unavailable>) + 186 at collection_notifier.cpp:421
    frame #7: 0x00618de4 Augury - Dev`void (anonymous namespace)::advance_with_notifications<realm::_impl::transaction::begin(context=0x14e54220, sg=0x159b9c00, func=0x0160d4f8, notifiers=0x0160d564)::$_1>(realm::BindingContext*, realm::SharedGroup&, realm::_impl::transaction::begin(realm::SharedGroup&, realm::BindingContext*, realm::_impl::NotifierPackage&)::$_1&&, realm::_impl::NotifierPackage&) + 876 at transact_log_handler.cpp:672
    frame #8: 0x00618a74 Augury - Dev`realm::_impl::transaction::begin(sg=0x159b9c00, context=0x14e54220, notifiers=0x0160d564) + 34 at transact_log_handler.cpp:702
    frame #9: 0x0048a686 Augury - Dev`realm::_impl::RealmCoordinator::promote_to_write(this=0x14fcbaf0, realm=0x14ef4600) + 342 at realm_coordinator.cpp:768
    frame #10: 0x005db272 Augury - Dev`realm::Realm::begin_transaction(this=0x14ef4600) + 450 at shared_realm.cpp:483
    frame #11: 0x0059c896 Augury - Dev`::-[RLMRealm beginWriteTransaction](self=0x14eee8a0, _cmd="beginWriteTransaction") + 110 at RLMRealm.mm:443
    frame #12: 0x000b1c04 Augury - Dev`-[RLMRealm(self=0x14eee8a0, _cmd="tryTransactionWithBlock:", block=0x00104b05) tryTransactionWithBlock:] + 106 at Realm+Customizations.m:19
    frame #13: 0x00104aea Augury - Dev`-[PersistentDataManager updateObjecstWithTransaction:](self=0x14eebd20, _cmd="updateObjecstWithTransaction:", block=0x000cbaf5) + 188 at PersistentDataManager.m:141
  * frame #14: 0x000cb85c Augury - Dev`__45-[GetMachinesForBuildingTask persistResponse]_block_invoke((null)=<unavailable>) + 716 at GetMachinesForBuildingTask.m:146
    frame #15: 0x01431ba8 libdispatch.dylib`_dispatch_barrier_sync_f_slow_invoke + 408
    frame #16: 0x01422d42 libdispatch.dylib`_dispatch_client_callout + 22
    frame #17: 0x014275e0 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1006
    frame #18: 0x1bd4c4a6 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
    frame #19: 0x1bd4a78e CoreFoundation`__CFRunLoopRun + 1422
    frame #20: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #21: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #22: 0x1d470bfc GraphicsServices`GSEventRunModal + 156
    frame #23: 0x20ea7e26 UIKit`-[UIApplication _run] + 574
    frame #24: 0x20ea2550 UIKit`UIApplicationMain + 150
    frame #25: 0x0036bbfc Augury - Dev`main(argc=1, argv=0x0160e9d4) + 126 at main.m:44
    frame #26: 0x1b46350a libdyld.dylib`start + 2

  thread #7: tid = 0x3a1f2, 0x1b538e84 libsystem_kernel.dylib`__semwait_signal + 24, name = 'gputools.smt_poll.0x14e6fde0'
    frame #0: 0x1b538e84 libsystem_kernel.dylib`__semwait_signal + 24
    frame #1: 0x1b48b34a libsystem_c.dylib`nanosleep + 168
    frame #2: 0x1b48b29e libsystem_c.dylib`usleep + 50
    frame #3: 0x019945ea GPUToolsCore`smt_poll_thread_entry(void*) + 126
    frame #4: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #5: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #6: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #8: tid = 0x3a1fb, 0x1b538e84 libsystem_kernel.dylib`__semwait_signal + 24, name = 'gputools.smt_poll.0x14e796b0'
    frame #0: 0x1b538e84 libsystem_kernel.dylib`__semwait_signal + 24
    frame #1: 0x1b48b34a libsystem_c.dylib`nanosleep + 168
    frame #2: 0x1b48b29e libsystem_c.dylib`usleep + 50
    frame #3: 0x019945ea GPUToolsCore`smt_poll_thread_entry(void*) + 126
    frame #4: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #5: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #6: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #9: tid = 0x3a1fd, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x1c5f388a Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 260
    frame #7: 0x1c612630 Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 86
    frame #8: 0x217ae2b2 UIKit`-[UIEventFetcher threadMain] + 128
    frame #9: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #10: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #11: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #12: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #11: tid = 0x3a206, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x00431a9e Augury - Dev`LoggerWorkerThread(logger=0x14fa0c60) + 254 at LoggerClient.m:597
    frame #7: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #8: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #9: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #12: tid = 0x3a203, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'GAIThread'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x1c5f388a Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 260
    frame #7: 0x1c6441de Foundation`-[NSRunLoop(NSRunLoop) run] + 80
    frame #8: 0x00408ef8 Augury - Dev`+[GAI threadMain:] + 64
    frame #9: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #10: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #11: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #12: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #13: tid = 0x3a204, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'Logentries'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x1c5f388a Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 260
    frame #7: 0x1c6441de Foundation`-[NSRunLoop(NSRunLoop) run] + 80
    frame #8: 0x006447c6 Augury - Dev`-[LEBackgroundThread main](self=0x159b0e00, _cmd="main") + 342 at LEBackgroundThread.m:378
    frame #9: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #10: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #11: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #12: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #14: tid = 0x3a205, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'NetworkReachabilityThread'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bcdb9d8 CoreFoundation`CFRunLoopRun + 104
    frame #6: 0x001ea254 Augury - Dev`-[ReachabilityManager reachabilityEntryPoint:](self=0x14ee9430, _cmd="reachabilityEntryPoint:", object=0x00000000) + 128 at ReachabilityManager.m:121
    frame #7: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #8: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #9: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #10: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #15: tid = 0x3a207, 0x1b538d74 libsystem_kernel.dylib`__select + 20
    frame #0: 0x1b538d74 libsystem_kernel.dylib`__select + 20
    frame #1: 0x00434b9c Augury - Dev`LoggerConsoleGrabThread(context=0x00000000) + 236 at LoggerClient.m:1097
    frame #2: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #3: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #4: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #16: tid = 0x3a208, 0x1b538d74 libsystem_kernel.dylib`__select + 20, name = 'com.apple.CFSocket.private'
    frame #0: 0x1b538d74 libsystem_kernel.dylib`__select + 20
    frame #1: 0x1bd51d66 CoreFoundation`__CFSocketManager + 552
    frame #2: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #3: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #4: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #18: tid = 0x3a20a, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x1c374488 CFNetwork`+[NSURLConnection(Loader) _resourceLoadLoop:] + 416
    frame #7: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #8: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #9: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #10: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #21: tid = 0x3a22e, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x1c5f388a Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 260
    frame #7: 0x1c6441de Foundation`-[NSRunLoop(NSRunLoop) run] + 80
    frame #8: 0x001e42b8 Augury - Dev`-[AUGUSBConnection packetTimeoutThreadEntryPoint:](self=0x16350f50, _cmd="packetTimeoutThreadEntryPoint:", object=0x00000000) + 242 at AUGUSBConnection.m:74
    frame #9: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #10: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #11: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #12: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #22: tid = 0x3a22d, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'APIManagerThread'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bcdb9d8 CoreFoundation`CFRunLoopRun + 104
    frame #6: 0x00277390 Augury - Dev`-[APIManager APIManagerThreadEntryPoint:](self=0x16225430, _cmd="APIManagerThreadEntryPoint:", object=0x00000000) + 128 at APIManager.m:612
    frame #7: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #8: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #9: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #10: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #23: tid = 0x3a22f, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'com.apple.CoreMotion.MotionThread'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bcdb9d8 CoreFoundation`CFRunLoopRun + 104
    frame #6: 0x21c52990 CoreMotion`___lldb_unnamed_symbol2464$$CoreMotion + 1256
    frame #7: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #8: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #9: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #28: tid = 0x3a23c, 0x1b538d74 libsystem_kernel.dylib`__select + 20
    frame #0: 0x1b538d74 libsystem_kernel.dylib`__select + 20
    frame #1: 0x0084a80e Augury - Dev`+[BGSLogCapture logCapture:](self=<unavailable>, _cmd=<unavailable>, arg=<unavailable>) + 406 at BGSLogCapture.m:103 [opt]
    frame #2: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #3: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #4: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #5: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #29: tid = 0x3a245, 0x1b538810 libsystem_kernel.dylib`__psynch_cvwait + 24
    frame #0: 0x1b538810 libsystem_kernel.dylib`__psynch_cvwait + 24
    frame #1: 0x1b5ecd2e libsystem_pthread.dylib`_pthread_cond_wait + 542
    frame #2: 0x1b5ee0be libsystem_pthread.dylib`pthread_cond_wait + 38
    frame #3: 0x1af8837e libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 118
    frame #4: 0x1fbeb728 JavaScriptCore`void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 88
    frame #5: 0x1fbeb6ac JavaScriptCore`bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 154
    frame #6: 0x1fbeb5b4 JavaScriptCore`bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*) + 10

  thread #30: tid = 0x3a246, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'WebThread'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x1fe878e2 WebCore`RunWebThread(void*) + 426
    frame #7: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #8: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #9: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #32: tid = 0x3a27a, 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20, name = 'AFNetworking'
    frame #0: 0x1b52384c libsystem_kernel.dylib`mach_msg_trap + 20
    frame #1: 0x1b52363e libsystem_kernel.dylib`mach_msg + 42
    frame #2: 0x1bd4c2f8 CoreFoundation`__CFRunLoopServiceMachPort + 136
    frame #3: 0x1bd4a5f6 CoreFoundation`__CFRunLoopRun + 1014
    frame #4: 0x1bc99532 CoreFoundation`CFRunLoopRunSpecific + 486
    frame #5: 0x1bc99340 CoreFoundation`CFRunLoopRunInMode + 104
    frame #6: 0x1c5f388a Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 260
    frame #7: 0x1c6441de Foundation`-[NSRunLoop(NSRunLoop) run] + 80
    frame #8: 0x003bb37e Augury - Dev`+[AFURLConnectionOperation networkRequestThreadEntryPoint:](self=AFHTTPRequestOperation, _cmd="networkRequestThreadEntryPoint:", object=0x00000000) + 354 at AFURLConnectionOperation.m:163
    frame #9: 0x1c6dcb10 Foundation`__NSThread__start__ + 1160
    frame #10: 0x1b5eda26 libsystem_pthread.dylib`_pthread_body + 216
    frame #11: 0x1b5ed94c libsystem_pthread.dylib`_pthread_start + 234
    frame #12: 0x1b5eb49c libsystem_pthread.dylib`thread_start + 8

  thread #55: tid = 0x3b435, 0x1b53955c libsystem_kernel.dylib`__ulock_wait + 24, queue = 'NSOperationQueue 0x16354320 :: NSOperation 0x16994ec0 (QOS: DEFAULT)'
    frame #0: 0x1b53955c libsystem_kernel.dylib`__ulock_wait + 24
    frame #1: 0x01447b14 libdispatch.dylib`_dispatch_ulock_wait + 38
    frame #2: 0x01447c12 libdispatch.dylib`_dispatch_thread_event_wait_slow + 24
    frame #3: 0x01431812 libdispatch.dylib`_dispatch_barrier_sync_f_slow + 214
    frame #4: 0x000cb57e Augury - Dev`dispatch_sync_main_thread(block=0x000cb591) + 118 at APITask.h:38
    frame #5: 0x000cb496 Augury - Dev`-[GetMachinesForBuildingTask persistResponse](self=0x16614a00, _cmd="persistResponse") + 802 at GetMachinesForBuildingTask.m:138
    frame #6: 0x00382d34 Augury - Dev`-[APITask handleAPIResponse](self=0x16614a00, _cmd="handleAPIResponse") + 436 at APITask.m:789
    frame #7: 0x003809d2 Augury - Dev`__25-[APITask executeAPITask]_block_invoke.304((null)=<unavailable>) + 46 at APITask.m:457
    frame #8: 0x00264af6 Augury - Dev`-[AUGPerformanceTracker measureDurationWithSubject:action:block:](self=0x16004510, _cmd="measureDurationWithSubject:action:block:", subject=0x16614a00, action=@"response processing", block=0x003809a5) + 124 at AUGPerformanceTracker.m:43
    frame #9: 0x0038074e Augury - Dev`-[APITask executeAPITask](self=0x16614a00, _cmd="executeAPITask") + 1934 at APITask.m:456
    frame #10: 0x0013419c Augury - Dev`__36-[APITaskWorkerPool executeNextTask]_block_invoke((null)=<unavailable>) + 560 at APITaskWorkerPool.m:483
    frame #11: 0x1c6bc5f0 Foundation`__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8
    frame #12: 0x1c60f00e Foundation`-[NSBlockOperation main] + 146
    frame #13: 0x1c60016a Foundation`-[__NSOperationInternal _start:] + 774
    frame #14: 0x1c6be872 Foundation`__NSOQSchedule_f + 190
    frame #15: 0x0142ee62 libdispatch.dylib`_dispatch_queue_serial_drain + 980
    frame #16: 0x01426204 libdispatch.dylib`_dispatch_queue_invoke + 556
    frame #17: 0x01430d9e libdispatch.dylib`_dispatch_root_queue_drain + 408
    frame #18: 0x01430ba6 libdispatch.dylib`_dispatch_worker_thread3 + 112
    frame #19: 0x1b5eb936 libsystem_pthread.dylib`_pthread_wqthread + 1168
    frame #20: 0x1b5eb490 libsystem_pthread.dylib`start_wqthread + 8

  thread #56: tid = 0x3b436, 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x1b5eb9a0 libsystem_pthread.dylib`_pthread_wqthread + 1274
    frame #2: 0x1b5eb490 libsystem_pthread.dylib`start_wqthread + 8

  thread #61: tid = 0x3b4a6, 0x1b538810 libsystem_kernel.dylib`__psynch_cvwait + 24
    frame #0: 0x1b538810 libsystem_kernel.dylib`__psynch_cvwait + 24
    frame #1: 0x1b5ecd2e libsystem_pthread.dylib`_pthread_cond_wait + 542
    frame #2: 0x1b5ee0be libsystem_pthread.dylib`pthread_cond_wait + 38
    frame #3: 0x1c6bae44 Foundation`-[__NSOperationInternal _waitUntilFinished:] + 130
    frame #4: 0x003e7c16 Augury - Dev`-[AFHTTPRequestOperationManager(self=0x165e33f0, _cmd="synchronouslyPerformMethod:URLString:parameters:operation:error:", method=@"GET", URLString=@"https://ci04-files.ci.augury.com/images/1486900696.png", parameters=0x00000000, operationPtr=0x19eff820, outError=0x19eff81c) synchronouslyPerformMethod:URLString:parameters:operation:error:] + 530 at AFHTTPRequestOperationManager+Synchronous.m:41
    frame #5: 0x003827a2 Augury - Dev`-[APITask sendAPIRequest](self=0x16312590, _cmd="sendAPIRequest") + 754 at APITask.m:731
    frame #6: 0x00380688 Augury - Dev`-[APITask executeAPITask](self=0x16312590, _cmd="executeAPITask") + 1736 at APITask.m:452
    frame #7: 0x0013419c Augury - Dev`__36-[APITaskWorkerPool executeNextTask]_block_invoke((null)=<unavailable>) + 560 at APITaskWorkerPool.m:483
    frame #8: 0x1c6bc5f0 Foundation`__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8
    frame #9: 0x1c60f00e Foundation`-[NSBlockOperation main] + 146
    frame #10: 0x1c60016a Foundation`-[__NSOperationInternal _start:] + 774
    frame #11: 0x1c6be872 Foundation`__NSOQSchedule_f + 190
    frame #12: 0x0142ee62 libdispatch.dylib`_dispatch_queue_serial_drain + 980
    frame #13: 0x01426204 libdispatch.dylib`_dispatch_queue_invoke + 556
    frame #14: 0x01430d9e libdispatch.dylib`_dispatch_root_queue_drain + 408
    frame #15: 0x01430ba6 libdispatch.dylib`_dispatch_worker_thread3 + 112
    frame #16: 0x1b5eb936 libsystem_pthread.dylib`_pthread_wqthread + 1168
    frame #17: 0x1b5eb490 libsystem_pthread.dylib`start_wqthread + 8

  thread #66: tid = 0x3b4ed, 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x1b5eb9a0 libsystem_pthread.dylib`_pthread_wqthread + 1274
    frame #2: 0x1b5eb490 libsystem_pthread.dylib`start_wqthread + 8

  thread #96: tid = 0x3b4e9, 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x1b5eb9a0 libsystem_pthread.dylib`_pthread_wqthread + 1274
    frame #2: 0x1b5eb490 libsystem_pthread.dylib`start_wqthread + 8

  thread #97: tid = 0x3b4ea, 0x1b5eb488 libsystem_pthread.dylib`start_wqthread
    frame #0: 0x1b5eb488 libsystem_pthread.dylib`start_wqthread

  thread #103: tid = 0x3b50f, 0x1b5eb488 libsystem_pthread.dylib`start_wqthread
    frame #0: 0x1b5eb488 libsystem_pthread.dylib`start_wqthread

  thread #113: tid = 0x3c234, 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x1b5eb9a0 libsystem_pthread.dylib`_pthread_wqthread + 1274
    frame #2: 0x1b5eb490 libsystem_pthread.dylib`start_wqthread + 8

  thread #114: tid = 0x3c235, 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x1b539744 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x1b5eb9a0 libsystem_pthread.dylib`_pthread_wqthread + 1274
    frame #2: 0x1b5eb490 libsystem_pthread.dylib`start_wqthread + 8

@sblepa
Copy link

sblepa commented Feb 14, 2017

@jpsim Please let me know if you suggest to downgrade my Realm version for now
Thanks

@pigeon-archive
Copy link

Hi @sblepa. You can also email us your Xcode project privately at help@realm.io. Please reference this issue in the body of the email and let us know if you decide to.

@jpsim
Copy link
Contributor Author

jpsim commented Feb 15, 2017

Hi @sblepa, it's hard for me to recommend that you downgrade to a previous version of Realm considering that most releases fix more bugs than they cause, but if a version of Realm is catastrophically failing for you, then obviously you need to do something to avoid that.

However, we'd much rather you shared with us how we can trigger this bug so we can not only help you with it, but also hopefully prevent others from hitting it.

@austinzheng
Copy link
Contributor

The fix for this shipped in 2.4.4.

@sblepa
Copy link

sblepa commented Mar 16, 2017

Great news thanks, can you please share the commit for this fix?

@austinzheng
Copy link
Contributor

The commit is in the object store repository, and can be viewed here (SHA in URL).

Note that, although the fix was pushed on the 19th of January, the updated version of the object store dependency containing that fix (and all subsequent fixes) wasn't actually pulled into a Cocoa release until 2.4.4.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants