realm / realm-core

Core database component for the Realm Mobile Database SDKs
https://realm.io
Apache License 2.0
1.02k stars 163 forks source link

Potential deadlock in SharedGroup::do_begin_write() #1544

Closed jpsim closed 8 years ago

jpsim commented 8 years ago

Reported by a cocoa user on Helpscout: https://secure.helpscout.net/conversation/168696551/2940/?folderId=366245

(lldb) bt all
* thread #1: tid = 0x161f2d, 0x00000001811fff90 libsystem_kernel.dylib`__psynch_mutexwait + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00000001811fff90 libsystem_kernel.dylib`__psynch_mutexwait + 8
    frame #1: 0x00000001812ca39c libsystem_pthread.dylib`_pthread_mutex_lock_wait + 96
    frame #2: 0x0000000100855eb8 Z`realm::util::RobustMutex::low_level_lock() + 12
    frame #3: 0x00000001008f7a14 Z`realm::SharedGroup::do_begin_write() + 28
    frame #4: 0x0000000100442fbc Z`void realm::SharedGroup::promote_to_write<(anonymous namespace)::TransactLogValidator>(this=0x000000012d27f400, history=0x000000012cfcda88, observer=0x000000016fd5a2a8)::TransactLogValidator*) + 144 at group_shared.hpp:942
    frame #5: 0x0000000100442f20 Z`void realm::_impl::SharedGroupFriend::promote_to_write<(anonymous namespace)::TransactLogValidator>(sg=0x000000012d27f400, hist=0x000000012cfcda88, obs=0x000000016fd5a2a8)::TransactLogValidator*) + 40 at group_shared.hpp:1099
    frame #6: 0x0000000100442eec Z`void realm::LangBindHelper::promote_to_write<(anonymous namespace)::TransactLogValidator>(sg=0x000000012d27f400, history=0x000000012cfcda88, observer=0x000000016fd5a2a8)::TransactLogValidator&&) + 40 at lang_bind_helper.hpp:376
    frame #7: 0x0000000100442e30 Z`auto realm::_impl::transaction::begin(this=0x000000016fd5a298, args=0x000000016fd5a2a8)::$_1::operator()<(anonymous namespace)::TransactLogValidator&>((anonymous namespace)::TransactLogValidator&&&) const + 64 at transact_log_handler.cpp:445
    frame #8: 0x0000000100442bc0 Z`(anonymous namespace)::TransactLogObserver::TransactLogObserver<realm::_impl::transaction::begin(this=0x000000016fd5a2a8, context=0x000000012e168ce0, sg=0x000000012d27f400, func=0x000000016fd5a298, validate_schema_changes=true)::$_1>(realm::BindingContext*, realm::SharedGroup&, realm::_impl::transaction::begin(realm::SharedGroup&, realm::ClientHistory&, realm::BindingContext*, bool)::$_1&&, bool) + 748 at transact_log_handler.cpp:222
    frame #9: 0x000000010043c870 Z`(anonymous namespace)::TransactLogObserver::TransactLogObserver<realm::_impl::transaction::begin(this=0x000000016fd5a2a8, context=0x000000012e168ce0, sg=0x000000012d27f400, func=0x000000016fd5a298, validate_schema_changes=true)::$_1>(realm::BindingContext*, realm::SharedGroup&, realm::_impl::transaction::begin(realm::SharedGroup&, realm::ClientHistory&, realm::BindingContext*, bool)::$_1&&, bool) + 64 at transact_log_handler.cpp:204
    frame #10: 0x000000010043c810 Z`realm::_impl::transaction::begin(sg=0x000000012d27f400, history=0x000000012cfcda40, context=0x000000012e168ce0, validate_schema_changes=true) + 88 at transact_log_handler.cpp:444
    frame #11: 0x0000000100436b94 Z`realm::Realm::begin_transaction(this=0x000000012e432fd8) + 472 at shared_realm.cpp:304
    frame #12: 0x000000010040a964 Z`-[RLMRealm beginWriteTransaction](self=0x000000012e143d70, _cmd="beginWriteTransaction") + 48 at RLMRealm.mm:474
    frame #13: 0x000000010040ace8 Z`-[RLMRealm transactionWithBlock:error:](self=0x000000012e143d70, _cmd="transactionWithBlock:error:", block=(Z`__36-[ZStorageManager addOrUpdateEntry:]_block_invoke at ZStorageManager.m:99), outError=domain: nil - code: 3254779904) + 68 at RLMRealm.mm:505
    frame #14: 0x00000001000d2334 Z`-[ZStorageManager addOrUpdateEntry:](self=0x000000012cf8ed70, _cmd="addOrUpdateEntry:", entry=0x000000012e4721e0) + 356 at ZStorageManager.m:99
    frame #15: 0x00000001000cb1a0 Z`-[ZUserManager addUsers:friend:callback:](self=0x000000012e432fb0, _cmd="addUsers:friend:callback:", friends=@"1 object", isFriend=NO, callback=<parent is NULL>) + 576 at ZUserManager.m:94
    frame #16: 0x00000001000cae74 Z`__36-[ZUserManager fetchUsers:callback:]_block_invoke(.block_descriptor=0x000000012e4708e0, task=0x000000012e46fa00, responseObject=@"1 object") + 124 at ZUserManager.m:84
    frame #17: 0x00000001000b2ff0 Z`__36-[ZAPIClient users:success:failure:]_block_invoke(.block_descriptor=0x000000012e4708b0, task=0x000000012e46fa00, responseObject=@"1 object") + 100 at ZAPIClient.m:151
    frame #18: 0x0000000100118494 Z`__116-[AFHTTPSessionManager dataTaskWithHTTPMethod:URLString:parameters:uploadProgress:downloadProgress:success:failure:]_block_invoke97(.block_descriptor=0x000000012e470790, response=0x000000012e4616f0, responseObject=@"1 object", error=0x0000000000000000) + 216 at AFHTTPSessionManager.m:287
    frame #19: 0x000000010013ac10 Z`__72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_2151(.block_descriptor=<unavailable>) + 224 at AFURLSessionManager.m:308
    frame #20: 0x0000000101505bf0 libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #21: 0x0000000101505bb0 libdispatch.dylib`_dispatch_client_callout + 16
    frame #22: 0x000000010150b658 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 2096
    frame #23: 0x0000000181614bb0 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
    frame #24: 0x0000000181612a18 CoreFoundation`__CFRunLoopRun + 1628
    frame #25: 0x0000000181541680 CoreFoundation`CFRunLoopRunSpecific + 384
    frame #26: 0x0000000182a50088 GraphicsServices`GSEventRunModal + 180
    frame #27: 0x00000001863b8d90 UIKit`UIApplicationMain + 204
    frame #28: 0x00000001000aeb8c Z`main(argc=2, argv=0x000000016fd5ba48) + 124 at main.m:14
    frame #29: 0x00000001810e28b8 libdyld.dylib`start + 4

  thread #5: tid = 0x161fc6, 0x00000001812014fc libsystem_kernel.dylib`kevent_qos + 8, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x00000001812014fc libsystem_kernel.dylib`kevent_qos + 8
    frame #1: 0x000000010151a270 libdispatch.dylib`_dispatch_mgr_invoke + 232
    frame #2: 0x0000000101507e2c libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #6: tid = 0x161fcb, 0x0000000181200440 libsystem_kernel.dylib`__semwait_signal + 8, name = 'gputools.smt_poll.0x12cedc250'
    frame #0: 0x0000000181200440 libsystem_kernel.dylib`__semwait_signal + 8
    frame #1: 0x000000018111d22c libsystem_c.dylib`nanosleep + 212
    frame #2: 0x000000018111d14c libsystem_c.dylib`usleep + 68
    frame #3: 0x00000001015749f0 GPUToolsCore`smt_poll_thread_entry(void*) + 140
    frame #4: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #5: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #10: tid = 0x161fe3, 0x00000001811e54bc libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x00000001811e54bc libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001811e5338 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x0000000181614ac0 CoreFoundation`__CFRunLoopServiceMachPort + 196
    frame #3: 0x00000001816127c4 CoreFoundation`__CFRunLoopRun + 1032
    frame #4: 0x0000000181541680 CoreFoundation`CFRunLoopRunSpecific + 384
    frame #5: 0x0000000181cb1434 CFNetwork`+[NSURLConnection(Loader) _resourceLoadLoop:] + 412
    frame #6: 0x000000018201fc40 Foundation`__NSThread__start__ + 1000
    frame #7: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #8: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #14: tid = 0x161fee, 0x00000001811e54bc libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.squareup.SocketRocket.NetworkThread'
    frame #0: 0x00000001811e54bc libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001811e5338 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x0000000181614ac0 CoreFoundation`__CFRunLoopServiceMachPort + 196
    frame #3: 0x00000001816127c4 CoreFoundation`__CFRunLoopRun + 1032
    frame #4: 0x0000000181541680 CoreFoundation`CFRunLoopRunSpecific + 384
    frame #5: 0x0000000181f3921c Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 308
    frame #6: 0x000000010045fdc4 Z`-[_SRRunLoopThread main](self=0x000000012e06a980, _cmd="main") + 348 at SRWebSocket.m:1799
    frame #7: 0x000000018201fc40 Foundation`__NSThread__start__ + 1000
    frame #8: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #9: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #15: tid = 0x161ff1, 0x0000000181200368 libsystem_kernel.dylib`__select + 8, name = 'com.apple.CFSocket.private'
    frame #0: 0x0000000181200368 libsystem_kernel.dylib`__select + 8
    frame #1: 0x000000018161b028 CoreFoundation`__CFSocketManager + 648
    frame #2: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #3: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #24: tid = 0x16213e, 0x00000001811e9a0c libsystem_kernel.dylib`kevent + 8, name = 'RLMRealm notification listener'
    frame #0: 0x00000001811e9a0c libsystem_kernel.dylib`kevent + 8
    frame #1: 0x00000001002beb1c Z`realm::_impl::ExternalCommitHelper::listen(this=0x000000012cf6a4a0) + 412 at external_commit_helper.cpp:199
    frame #2: 0x00000001002bf6e4 Z`realm::_impl::ExternalCommitHelper::ExternalCommitHelper(this=0x000000012e16a550)::$_0::operator()() const + 24 at external_commit_helper.cpp:159
    frame #3: 0x00000001002bf6c0 Z`_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=0x000000012e16a550)::$_0>(fp)(std::__1::forward<>(fp0))), realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0&&) + 64 at __functional_base:415
    frame #4: 0x00000001002bf6b0 Z`_ZNSt3__112__async_funcIZN5realm5_impl20ExternalCommitHelperC1ERNS2_16RealmCoordinatorEE3$_0JEE9__executeIJEEEvNS_15__tuple_indicesIJXspT_EEEE(this=0x000000012e16a550, (null)=__tuple_indices<> @ 0x000000016e6a6c00) + 48 at future:2342
    frame #5: 0x00000001002bf674 Z`std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>::operator(this=0x000000012e16a550)() + 24 at future:2335
    frame #6: 0x00000001002bf588 Z`std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::__execute(this=0x000000012e16a4c0) + 32 at future:1029
    frame #7: 0x00000001002bfe18 Z`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=0x000000012cf33f90, __a0=0x000000012cf33fa0)::$_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> >*&&) + 100 at __functional_base:382
    frame #8: 0x00000001002bfdb4 Z`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=0x000000012cf33f90, (null)=__tuple_indices<1> @ 0x000000016e6a6eb0) + 40 at thread:337
    frame #9: 0x00000001002bfd8c Z`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=0x000000012cf33f90) + 264 at thread:347
    frame #10: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #11: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #25: tid = 0x1621d5, 0x0000000181200368 libsystem_kernel.dylib`__select + 8, name = 'Thread 0x0x12e55b190'
    frame #0: 0x0000000181200368 libsystem_kernel.dylib`__select + 8
    frame #1: 0x0000000100662a68 Z`rtc::PhysicalSocketServer::Wait(int, bool) + 504
    frame #2: 0x000000010065592c Z`rtc::MessageQueue::Get(rtc::Message*, int, bool) + 816
    frame #3: 0x0000000100669e98 Z`rtc::Thread::ProcessMessages(int) + 108
    frame #4: 0x0000000100669d24 Z`rtc::Thread::PreRun(void*) + 112
    frame #5: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #6: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #26: tid = 0x1621d6, 0x0000000181200368 libsystem_kernel.dylib`__select + 8, name = 'Thread 0x0x12e429550'
    frame #0: 0x0000000181200368 libsystem_kernel.dylib`__select + 8
    frame #1: 0x0000000100662a68 Z`rtc::PhysicalSocketServer::Wait(int, bool) + 504
    frame #2: 0x000000010065592c Z`rtc::MessageQueue::Get(rtc::Message*, int, bool) + 816
    frame #3: 0x0000000100669e98 Z`rtc::Thread::ProcessMessages(int) + 108
    frame #4: 0x0000000100669d24 Z`rtc::Thread::PreRun(void*) + 112
    frame #5: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #6: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #27: tid = 0x1621d7, 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'SCTP iterator'
    frame #0: 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001812c6ce8 libsystem_pthread.dylib`_pthread_cond_wait + 648
    frame #2: 0x00000001006f4988 Z`sctp_iterator_thread + 72
    frame #3: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #4: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #28: tid = 0x1621d8, 0x0000000181200368 libsystem_kernel.dylib`__select + 8, name = 'SCTP timer'
    frame #0: 0x0000000181200368 libsystem_kernel.dylib`__select + 8
    frame #1: 0x00000001006f4e18 Z`user_sctp_timer_iterate + 364
    frame #2: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #3: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #29: tid = 0x1621d9, 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'VoiceProcessThread'
    frame #0: 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001812c6ce8 libsystem_pthread.dylib`_pthread_cond_wait + 648
    frame #2: 0x000000010066eb98 Z`rtc::Event::Wait(int) + 240
    frame #3: 0x00000001006ec650 Z`webrtc::EventWrapperImpl::Wait(unsigned long) + 16
    frame #4: 0x00000001008258d0 Z`webrtc::ProcessThreadImpl::Process() + 380
    frame #5: 0x000000010066fff4 Z`rtc::PlatformThread::Run() + 76
    frame #6: 0x000000010066ff9c Z`rtc::PlatformThread::StartThread(void*) + 12
    frame #7: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #8: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #30: tid = 0x1621da, 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'PacerThread'
    frame #0: 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001812c6ce8 libsystem_pthread.dylib`_pthread_cond_wait + 648
    frame #2: 0x000000010066eb98 Z`rtc::Event::Wait(int) + 240
    frame #3: 0x00000001006ec650 Z`webrtc::EventWrapperImpl::Wait(unsigned long) + 16
    frame #4: 0x00000001008258d0 Z`webrtc::ProcessThreadImpl::Process() + 380
    frame #5: 0x000000010066fff4 Z`rtc::PlatformThread::Run() + 76
    frame #6: 0x000000010066ff9c Z`rtc::PlatformThread::StartThread(void*) + 12
    frame #7: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #8: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #31: tid = 0x1621db, 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'ModuleProcessThread'
    frame #0: 0x00000001811fff48 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001812c6ce8 libsystem_pthread.dylib`_pthread_cond_wait + 648
    frame #2: 0x000000010066eb98 Z`rtc::Event::Wait(int) + 240
    frame #3: 0x00000001006ec650 Z`webrtc::EventWrapperImpl::Wait(unsigned long) + 16
    frame #4: 0x00000001008258d0 Z`webrtc::ProcessThreadImpl::Process() + 380
    frame #5: 0x000000010066fff4 Z`rtc::PlatformThread::Run() + 76
    frame #6: 0x000000010066ff9c Z`rtc::PlatformThread::StartThread(void*) + 12
    frame #7: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #8: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #32: tid = 0x162246, 0x00000001811e54bc libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.apple.coreaudio.AQClient'
    frame #0: 0x00000001811e54bc libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001811e5338 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x0000000181614ac0 CoreFoundation`__CFRunLoopServiceMachPort + 196
    frame #3: 0x00000001816127c4 CoreFoundation`__CFRunLoopRun + 1032
    frame #4: 0x0000000181541680 CoreFoundation`CFRunLoopRunSpecific + 384
    frame #5: 0x0000000183a5e410 AudioToolbox`GenericRunLoopThread::Entry(void*) + 164
    frame #6: 0x0000000183a50814 AudioToolbox`CAPThread::Entry(CAPThread*) + 124
    frame #7: 0x00000001812c7b28 libsystem_pthread.dylib`_pthread_body + 156
    frame #8: 0x00000001812c7a8c libsystem_pthread.dylib`_pthread_start + 156

  thread #33: tid = 0x162460, 0x0000000181200b6c libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x0000000181200b6c libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x00000001812c5530 libsystem_pthread.dylib`_pthread_wqthread + 1284

  thread #34: tid = 0x162461, 0x0000000181200b6c libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x0000000181200b6c libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x00000001812c5530 libsystem_pthread.dylib`_pthread_wqthread + 1284

  thread #35: tid = 0x162463, 0x0000000181200b6c libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x0000000181200b6c libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x00000001812c5530 libsystem_pthread.dylib`_pthread_wqthread + 1284
(lldb) 

I'm working with the user to gather more information.

jpsim commented 8 years ago

Looks like this is #1429.

JP

Is it possible that these deadlocks are happening while you're accessing a single Realm from multiple processes?

For example, in the iOS Simulator while viewing the Realm file in the Realm Browser OS X app? Or while using Realm in iOS extensions?

If so, this may be https://github.com/realm/realm-cocoa/issues/2159

User

Hi, you're totally right, it always happened while having a Realm Browser open. I've been testing these days without having it open and no problem. Then today it went to deadlock and it turns out I had the RB open. This might explain all the deadlocks I've been having. Nice to know that issue is being addressed :)