-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
How frequently does the bug occur?
Sometimes
Description
Firebase title: realm::util::terminate(char const_, char const_, long, std::initializer_list<realm::util::Printable>&&)
SIGABRT (ABORT)
This bug happens in production and it's a big problem for us, but we can't figure out what's wrong. The bug occurs 100% in BACKGROUND.
Stacktrace & log output
Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
Crashed: com.example.RealmQueue 0 libsystem_kernel.dylib 0x277b0 __pthread_kill + 8 1 libsystem_pthread.dylib 0xa9c0 pthread_kill + 212 2 libsystem_c.dylib 0x73a38 abort + 120 3 Example 0x1276ad0 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 323164 4 Example 0x1276e04 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) + 323984 5 Example 0x1276c74 realm::util::terminate_with_info(char const*, char const*, long, char const*, std::initializer_list<realm::util::Printable>&&) + 323584 6 Example 0x1276ae4 realm::util::terminate_with_info(char const*, char const*, long, char const*, std::initializer_list<realm::util::Printable>&&) + 323184 7 Example 0x141e628 realm::util::Scheduler::make_runloop(__CFRunLoop*) + 5584 8 Example 0x1370a10 realm::_impl::RealmCoordinator::get_realm(realm::RealmConfig, std::__1::optional<realm::VersionID>) + 1346972 9 Example 0x13ba42c realm::Realm::get_shared_realm(realm::RealmConfig) + 7676 10 Example 0x1736e80 +[RLMRealm realmWithConfiguration:confinedTo:error:] + 430 (RLMRealm.mm:430) 11 Example 0x1736a1c +[RLMRealm realmWithConfiguration:queue:error:] + 395 (RLMRealm.mm:395) 12 Example 0x17c9568 @nonobjc RLMRealm.__allocating_init(configuration:queue:) + 3851536 (<compiler-generated>:3851536) 13 Example 0x17c9b94 Realm.init(configuration:queue:) + 95 (Realm.swift:95) 14 Example 0x13ee24 specialized static Realm.performRealmAction<A>(configuration:file:function:line:action:) + 4333760036 15 Example 0x3ee850 specialized closure realm/realm-swift#1 in static Realm.sync<A>(configuration:file:function:line:action:) + 4336576592 16 Example 0x3f5a70 partial apply for specialized closure realm/realm-swift#1 in static Realm.sync<A>(configuration:file:function:line:action:) + 4336605808 17 Example 0x140bf8 specialized closure realm/realm-swift#2 in static Realm.performTaskOnRealmQueue<A>(method:file:function:line:_:) + 4333767672 18 Example 0x140c50 specialized closure realm/realm-swift#2 in static Realm.performTaskOnRealmQueue<A>(method:file:function:line:_:) + 4333767760 (<compiler-generated>:4333767760) 19 Example 0x3f5720 partial apply for specialized closure realm/realm-swift#2 in static Realm.performTaskOnRealmQueue<A>(method:file:function:line:_:) + 4336604960 (<compiler-generated>:4336604960) 20 libswiftDispatch.dylib 0x6c24 partial apply for thunk for @callee_guaranteed () -> (@out A, @error @owned Error) + 20 21 libswiftDispatch.dylib 0x6d50 thunk for @callee_guaranteed () -> (@out A, @error @owned Error)partial apply + 12 22 libswiftDispatch.dylib 0x5604 closure realm/realm-swift#1 in closure realm/realm-swift#1 in OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 120 23 libswiftDispatch.dylib 0x6b40 partial apply for thunk for @callee_guaranteed () -> () + 20 24 libswiftDispatch.dylib 0x5380 thunk for @escaping @callee_guaranteed () -> () + 20 25 libdispatch.dylib 0x61298 _dispatch_client_callout + 16 26 libdispatch.dylib 0x43f70 _dispatch_lane_barrier_sync_invoke_and_complete + 56 27 libswiftDispatch.dylib 0x5eb4 implicit closure realm/realm-swift#2 in implicit closure realm/realm-swift#1 in OS_dispatch_queue.sync<A>(execute:) + 152 28 libswiftDispatch.dylib 0x647c partial apply for implicit closure realm/realm-swift#2 in implicit closure realm/realm-swift#1 in OS_dispatch_queue.sync<A>(execute:) + 40 29 libswiftDispatch.dylib 0x548c OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 256 30 libswiftDispatch.dylib 0x5adc OS_dispatch_queue.sync<A>(execute:) + 140 31 Example 0x3e5068 specialized static Realm.performTaskOnRealmQueue<A>(method:file:function:line:_:) + 239 (Realm+Helpers.swift:239) 32 Example 0x3f092c static RLMAddresseeRepo.getAddressee(withId:) + 50 (Realm+Helpers.swift:50) 33 Example 0x3e45ac RLMAddresseeRepo.getGroup(uuid:) + 171 (RLMAddresseeRepo.swift:171) 34 Example 0xc18b8 DefaultSocketReadProtocol.handleRoomGameTableUpsert(of:with:) + 1347 (SocketProtocol.swift:1347) 35 Example 0xba63c DefaultSocketReadProtocol.handle(other:) + 386 (SocketProtocol.swift:386) 36 Example 0x16a2a0 closure realm/realm-swift#1 in IOCore.handleReadContent(_:) + 334 (IOCore.swift:334) 37 Example 0x2dc27c thunk for @escaping @callee_guaranteed @Sendable () -> () + 4335452796 (<compiler-generated>:4335452796) 38 libdispatch.dylib 0x602b0 _dispatch_call_block_and_release + 24 39 libdispatch.dylib 0x61298 _dispatch_client_callout + 16 40 libdispatch.dylib 0x3d344 _dispatch_lane_serial_drain$VARIANT$armv81 + 568 41 libdispatch.dylib 0x3de2c _dispatch_lane_invoke$VARIANT$armv81 + 400 42 libdispatch.dylib 0x4766c _dispatch_workloop_worker_thread + 692 43 libsystem_pthread.dylib 0xb5bc _pthread_wqthread + 272 44 libsystem_pthread.dylib 0xe86c start_wqthread + 8 com.apple.main-thread 0 CVNLP 0x575b0 CVNLPLanguageModelWithStateCreateCopy + 155520 1 libsystem_c.dylib 0x55008 exit + 24 2 UIKitCore 0xb3b89c -[UIApplication terminateWithSuccess] + 498 3 UIKitCore 0x206f6c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 124 4 UIKitCore 0x206bf0 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 216 5 UIKitCore 0xb317d4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 208 6 FrontBoardServices 0x551c -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 84 7 FrontBoardServices 0x2fc44 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 76 8 FrontBoardServices 0x16420 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 232 9 FrontBoardServices 0x2fbe0 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 104 10 libdispatch.dylib 0x61298 _dispatch_client_callout + 16 11 libdispatch.dylib 0x39ff8 _dispatch_block_invoke_direct$VARIANT$armv81 + 216 12 FrontBoardServices 0x54e04 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40 13 FrontBoardServices 0x54acc -[FBSSerialQueue _targetQueue_performNextIfPossible] + 404 14 FrontBoardServices 0x54fa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 15 CoreFoundation 0x9a8a8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 16 CoreFoundation 0x9a7a8 __CFRunLoopDoSource0 + 204 17 CoreFoundation 0x99afc __CFRunLoopDoSources0 + 256 18 CoreFoundation 0x94018 __CFRunLoopRun + 768 19 CoreFoundation 0x937d0 CFRunLoopRunSpecific + 572 20 GraphicsServices 0x3570 GSEventRunModal + 160 21 UIKitCore 0xb302d0 -[UIApplication _run] + 1052 22 UIKitCore 0xb3584c UIApplicationMain + 164 23 Example 0x19015c main + 22 (AppDelegate.swift:22) 24 libdyld.dylib 0x1140 start + 4 com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x3908 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x2d0c mach_msg + 72 2 CoreFoundation 0x99db8 __CFRunLoopServiceMachPort + 368 3 CoreFoundation 0x941b8 __CFRunLoopRun + 1184 4 CoreFoundation 0x937d0 CFRunLoopRunSpecific + 572 5 Foundation 0x7e64 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 6 Foundation 0x7d44 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 7 UIKitCore 0xbdce10 -[UIEventFetcher threadMain] + 504 8 Foundation 0x164d90 __NSThread__start__ + 848 9 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 10 libsystem_pthread.dylib 0xe878 thread_start + 8 com.google.firebase.crashlytics.MachExceptionServer 0 libsystem_kernel.dylib 0x3908 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x2d0c mach_msg + 72 2 Example 0x14e0798 FIRCLSMachExceptionServer + 192 (FIRCLSMachException.c:192) 3 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 4 libsystem_pthread.dylib 0xe878 thread_start + 8 AVAudioSession Notify Thread 0 libsystem_kernel.dylib 0x3908 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x2d0c mach_msg + 72 2 CoreFoundation 0x99db8 __CFRunLoopServiceMachPort + 368 3 CoreFoundation 0x941b8 __CFRunLoopRun + 1184 4 CoreFoundation 0x937d0 CFRunLoopRunSpecific + 572 5 AudioSession 0xcf18 GenericRunLoopThread::Entry(void*) + 156 6 AudioSession 0xee84 CAPThread::Entry(CAPThread*) + 88 7 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 8 libsystem_pthread.dylib 0xe878 thread_start + 8 com.apple.CFSocket.private 0 libsystem_kernel.dylib 0x27a64 __select + 8 1 libsystem_kernel.dylib 0x27a64 select$DARWIN_EXTSN + 8 2 CoreFoundation 0xa6190 __CFSocketManager + 620 3 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 4 libsystem_pthread.dylib 0xe878 thread_start + 8 Realm notification listener 0 libsystem_kernel.dylib 0x29318 kevent + 8 1 Example 0x135921c realm::_impl::ExternalCommitHelper::listen() + 1250728 2 Example 0x1359378 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&, realm::RealmConfig const&)::$_0>>(void*) + 1251076 3 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 4 libsystem_pthread.dylib 0xe878 thread_start + 8 com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x3908 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x2d0c mach_msg + 72 2 CoreFoundation 0x99db8 __CFRunLoopServiceMachPort + 368 3 CoreFoundation 0x941b8 __CFRunLoopRun + 1184 4 CoreFoundation 0x937d0 CFRunLoopRunSpecific + 572 5 CFNetwork 0x233ee8 _CFURLStorageSessionCopyCache + 59760 6 Foundation 0x164d90 __NSThread__start__ + 848 7 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 8 libsystem_pthread.dylib 0xe878 thread_start + 8 JavaScriptCore bmalloc scavenger 0 libsystem_kernel.dylib 0x27580 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x6d78 _pthread_cond_wait$VARIANT$armv81 + 1236 2 libc++.1.dylib 0xca20 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24 3 JavaScriptCore 0xede36c void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 108 4 JavaScriptCore 0xee2b98 bmalloc::Scavenger::threadRunLoop() + 252 5 JavaScriptCore 0xee25b4 bmalloc::Scavenger::Scavenger(std::__1::scoped_lock<bmalloc::Mutex> const&) + 10 6 JavaScriptCore 0xee3ccc std::__1::__thread_specific_ptr<std::__1::__thread_struct>::set_pointer(std::__1::__thread_struct*) + 42 7 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 8 libsystem_pthread.dylib 0xe878 thread_start + 8 com.apple.coreaudio.AQClient 0 libsystem_kernel.dylib 0x3908 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x2d0c mach_msg + 72 2 CoreFoundation 0x99db8 __CFRunLoopServiceMachPort + 368 3 CoreFoundation 0x941b8 __CFRunLoopRun + 1184 4 CoreFoundation 0x937d0 CFRunLoopRunSpecific + 572 5 AudioToolbox 0x1b25a4 <redacted> + 156 6 libAudioToolboxUtility.dylib 0xf424 CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 88 7 libsystem_pthread.dylib 0x9c74 _pthread_start + 288 8 libsystem_pthread.dylib 0xe878 thread_start + 8 notificationQueue 0 libsystem_kernel.dylib 0x27580 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x6d78 _pthread_cond_wait$VARIANT$armv81 + 1236 2 Foundation 0x82504 -[NSOperation waitUntilFinished] + 580 3 CoreFoundation 0x7be40 _CFXNotificationPost + 776 4 Foundation 0x6704 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60 5 Example 0x3df618 closure realm/realm-swift#1 in postNotification(name:object:userInfo:) + 246 (Util.swift:246) 6 Example 0x3df870 partial apply for closure realm/realm-swift#1 in closure realm/realm-swift#1 in runInMainQueue(_:) + 56 (Util.swift:56) 7 Example 0x2dc27c thunk for @escaping @callee_guaranteed @Sendable () -> () + 4335452796 (<compiler-generated>:4335452796) 8 libdispatch.dylib 0x602b0 _dispatch_call_block_and_release + 24 9 libdispatch.dylib 0x61298 _dispatch_client_callout + 16 10 libdispatch.dylib 0x3d344 _dispatch_lane_serial_drain$VARIANT$armv81 + 568 11 libdispatch.dylib 0x3de2c _dispatch_lane_invoke$VARIANT$armv81 + 400 12 libdispatch.dylib 0x4766c _dispatch_workloop_worker_thread + 692 13 libsystem_pthread.dylib 0xb5bc _pthread_wqthread + 272 14 libsystem_pthread.dylib 0xe86c start_wqthread + 8 socketConnectQueue 0 libswiftCore.dylib 0x90650 _debugPrint_unlocked<A, B>(_:_:) + 128 1 libswiftCore.dylib 0x21c6f0 specialized _debugPrint<A>(_:separator:terminator:to:) + 1340 2 libswiftCore.dylib 0x1c48c Array.description.getter + 408 3 Example 0x76484 ByteArrayInputStream.debugDescription.getter + 83 (ByteArrayInputStream.swift:83) 4 Example 0x765d4 protocol witness for CustomDebugStringConvertible.debugDescription.getter in conformance ByteArrayInputStream + 4303775188 (<compiler-generated>:4303775188) 5 libswiftCore.dylib 0x8fe6c _print_unlocked<A, B>(_:_:) + 732 6 Example 0xa5bf8 POOPInput.skipOptionalField(_:) + 82 (POOPInput.swift:82) 7 Example 0x1abca8 POOP.BalanceUpdatedMessage.init(input:) + 5204 (POOP.swift:5204) 8 Example 0x1a5c68 static POOP.Event.create(from:) + 1136 (POOP.swift:1136) 9 Example 0x169634 IOCore.handleReadContent(_:) + 304 (IOCore.swift:304) 10 Example 0x16a8a4 @objc IOCore.handleReadContent(_:) + 4304775332 (<compiler-generated>:4304775332) 11 Example 0x47e918 closure realm/realm-swift#1 in SocketManager.readBody(bodyLength:) + 167 (SocketManager.swift:167) 12 libswiftNetwork.dylib 0x146c4 partial apply for closure realm/realm-swift#1 in NWConnection.receiveMessage(completion:) + 164 13 libswiftNetwork.dylib 0x7620 thunk for @escaping @callee_guaranteed (@guaranteed OS_dispatch_data?, @guaranteed OS_nw_content_context?, @unowned Bool, @guaranteed OS_nw_error?) -> () + 96 14 libdispatch.dylib 0xe7f4 _dispatch_block_async_invoke2 + 104 15 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16 16 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592 17 libdispatch.dylib 0x9e40 _dispatch_lane_invoke$VARIANT$mp + 428 18 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596 19 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304 20 libsystem_pthread.dylib 0xecd4 start_wqthread + 4 ExampleApp.DatabaseQueue 0 libsystem_kernel.dylib 0x25674 stat + 8 1 libsystem_c.dylib 0x2ce24 __getcwd + 312 2 libsystem_c.dylib 0x2c980 __private_getcwd + 148 3 libsqlite3.dylib 0x13fc sqlite3_open_v2 + 1560 4 Example 0x442910 DBManager.SqlDb.open() + 390 (DBManager.swift:390) 5 Example 0x442740 closure realm/realm-swift#1 in static DBManager.executeChange(_:withArgs:) + 63 (DBManager.swift:63) 6 Example 0x4494c8 partial apply for closure realm/realm-swift#1 in static DBManager.schedule(_:) + 264 (DBManager.swift:264) 7 Example 0x5a702c thunk for @callee_guaranteed () -> () + 4309217324 (<compiler-generated>:4309217324) 8 Example 0x5a7048 thunk for @escaping @callee_guaranteed () -> () + 4309217352 (<compiler-generated>:4309217352) 9 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16 10 libdispatch.dylib 0xec1c _dispatch_lane_barrier_sync_invoke_and_complete + 56 11 Example 0x443ec4 specialized static DBManager.schedule(_:) + 263 (DBManager.swift:263) 12 Example 0x4423b0 static DBManager.executeChange(_:withArgs:) + 70 (DBManager.swift:70) 13 Example 0x36a5e0 MessagesRepo.deleteRoomMessages(before:) + 862 (MessageRepo.swift:862) 14 Example 0x228e18 closure realm/realm-swift#1 in static RepeatingTaskRunner.getDBCleanupAction() + 107 (TaskRunner.swift:107) 15 Example 0x3de460 closure realm/realm-swift#1 in closure realm/realm-swift#1 in runInMainQueue(_:) + 57 (Util.swift:57) 16 Example 0x2dc27c thunk for @escaping @callee_guaranteed @Sendable () -> () + 4306289276 (<compiler-generated>:4306289276) 17 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release + 24 18 libdispatch.dylib 0x607d4 _dispatch_client_callout + 16 19 libdispatch.dylib 0x9324 _dispatch_lane_serial_drain$VARIANT$mp + 592 20 libdispatch.dylib 0x9e40 _dispatch_lane_invoke$VARIANT$mp + 428 21 libdispatch.dylib 0x124ac _dispatch_workloop_worker_thread + 596 22 libsystem_pthread.dylib 0xc114 _pthread_wqthread + 304 23 libsystem_pthread.dylib 0xecd4 start_wqthread + 4
Can you reproduce the bug?
No
Reproduction Steps
No response
Version
10.47.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 12-17
Build environment
Xcode version: 14.2-15.2
Dependency manager and version: Cocoapods 1.15.2
- is duplicated by
-
RCOCOA-2298 Crashed: Realm Notification Listener (BACKGROUND)
- Closed
-
RCOCOA-2299 Crashed: com.example.RealmQueue SIGABRT ABORT 0x00000001c823e7b0
- Closed