cpp_client_telemetry icon indicating copy to clipboard operation
cpp_client_telemetry copied to clipboard

Terminating app due to uncaught exception 'std::__1::system_error', reason: 'recursive_mutex lock failed: Invalid argument'

Open iCodeWoods opened this issue 2 years ago • 10 comments

  • SDKVersion: 3.6.69
  • platform: iOS
  • Steps to reproduce: Online problem, can't repro.

Incident Identifier: 3d94be34-cfe6-475e-a1ad-a2f83c8219de CrashReporter Key: 78963EDB-41E8-48E7-81C7-179BB23EFBBD Hardware Model: iPhone10,6 Process: XXX [25116] Path: /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/XXX Identifier: XXX Version: 22.4.400420001 (400420001) Code Type: arm64 Parent Process: [1]

Date/Time: 2022-04-24T16:32:51.999Z Launch Time: 2022-04-24T16:08:09Z OS Version: iPhone OS 15.3.1 (19D52) Report Version: 104

Exception Type: SIGSEGV Exception Codes: SEGV_MAPERR at 0xd0dc560fe0e0 Crashed Thread: 2

Application Specific Information: *** Terminating app due to uncaught exception 'std::__1::system_error', reason: 'recursive_mutex lock failed: Invalid argument'

Last Exception Backtrace: 0 libc++abi.dylib 0x000000019b3092cc std::__terminate(void ()()) + 16 1 libc++abi.dylib 0x000000019b30bbd0 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception) + 28 2 libc++abi.dylib 0x000000019b30bb90 __cxa_throw + 128 3 libc++.1.dylib 0x000000019b2b2e00 std::__1::__throw_system_error(int, char const*) + 84 4 libc++.1.dylib 0x000000019b2a902c std::__1::recursive_mutex::lock() + 32 5 XXX 0x00000001028884c8 Microsoft::Applications::Events::DebugEventSource::DispatchEvent(Microsoft::Applications::Events::DebugEvent) (__mutex_base:90) 6 XXX 0x00000001028a6130 Microsoft::Applications::Events::LogManagerImpl::DispatchEvent(Microsoft::Applications::Events::DebugEvent) (LogManagerImpl.cpp:695) 7 XXX 0x00000001028c70d0 Microsoft::Applications::Events::HttpResponseDecoder::DispatchEvent(Microsoft::Applications::Events::DebugEvent) (HttpResponseDecoder.cpp:36) 8 XXX 0x00000001028c6c5c Microsoft::Applications::Events::HttpResponseDecoder::handleDecode(std::__1::shared_ptrMicrosoft::Applications::Events::EventsUploadContext const&) (HttpResponseDecoder.cpp:0) 9 XXX 0x00000001028c52f4 Microsoft::Applications::Events::HttpClientManager::onHttpResponse(Microsoft::Applications::Events::HttpClientManager::HttpCallback*) (HttpClientManager.cpp:133) 10 XXX 0x00000001028e03f8 Microsoft::Applications::Events::PlatformAbstraction::WorkerThread::threadFunc(void*) (WorkerThread.cpp:241) 11 XXX 0x00000001028e0ae4 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void ()(void), void*> >(void*) (type_traits:3918) 12 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 13 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 2 Crashed: 0 ??? 0x0000000c560fe0e0 0x0 + 0 1 XXX 0x0000000102a63fd0 MSplcrash_signal_handler (PLCrashSignalHandler.mm:201) 2 libsystem_platform.dylib 0x00000001de43cd48 _sigtramp + 48 3 libsystem_pthread.dylib 0x00000001de457824 pthread_kill + 204 4 libsystem_c.dylib 0x000000018e39b0b4 abort + 116 5 XXX 0x0000000104baaf6c uncaught_exception_handler.cold.1 + 24 6 XXX 0x0000000102a67cb4 uncaught_exception_handler (PLCrashReporter.m:371) 7 XXX 0x0000000102a50878 uncaught_cxx_exception_handler(MSACCrashesUncaughtCXXExceptionInfo const*) (MSACCrashes.mm:142) 8 XXX 0x0000000102a5c04c MSACCrashesUncaughtCXXTerminateHandler() (MSACCrashesCXXExceptionHandler.mm:96) 9 libc++abi.dylib 0x000000019b3092cc std::__terminate(void ()()) + 12 10 libc++abi.dylib 0x000000019b30bbd0 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception) + 28 11 libc++abi.dylib 0x000000019b30bb90 __cxa_throw + 128 12 libc++.1.dylib 0x000000019b2b2e00 std::__1::__throw_system_error(int, char const*) + 84 13 libc++.1.dylib 0x000000019b2a902c std::__1::recursive_mutex::lock() + 32 14 XXX 0x00000001028884c8 Microsoft::Applications::Events::DebugEventSource::DispatchEvent(Microsoft::Applications::Events::DebugEvent) (__mutex_base:90) 15 XXX 0x00000001028a6130 Microsoft::Applications::Events::LogManagerImpl::DispatchEvent(Microsoft::Applications::Events::DebugEvent) (LogManagerImpl.cpp:695) 16 XXX 0x00000001028c70d0 Microsoft::Applications::Events::HttpResponseDecoder::DispatchEvent(Microsoft::Applications::Events::DebugEvent) (HttpResponseDecoder.cpp:36) 17 XXX 0x00000001028c6c5c Microsoft::Applications::Events::HttpResponseDecoder::handleDecode(std::__1::shared_ptrMicrosoft::Applications::Events::EventsUploadContext const&) (HttpResponseDecoder.cpp:0) 18 XXX 0x00000001028c52f4 Microsoft::Applications::Events::HttpClientManager::onHttpResponse(Microsoft::Applications::Events::HttpClientManager::HttpCallback*) (HttpClientManager.cpp:133) 19 XXX 0x00000001028e03f8 Microsoft::Applications::Events::PlatformAbstraction::WorkerThread::threadFunc(void*) (WorkerThread.cpp:241) 20 XXX 0x00000001028e0ae4 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void ()(void), void*> >(void*) (type_traits:3918) 21 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 22 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 0: 0 MicrosoftCognitiveServicesSpeech 0x00000001062ed670 0x105f0c000 + 4068976 1 libsystem_c.dylib 0x000000018e3964c8 exit + 24 2 UIKitCore 0x00000001870068e4 -[UIApplication _terminateWithStatus:] + 496 3 UIKitCore 0x0000000186772290 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 120 4 UIKitCore 0x000000018694ce38 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 216 5 UIKitCore 0x0000000187002e70 -[UIApplication workspaceShouldExit:withTransitionContext:] + 204 6 FrontBoardServices 0x0000000194a9c054 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72 7 FrontBoardServices 0x0000000194a5c0f0 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 228 8 FrontBoardServices 0x0000000194a9bff0 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 100 9 libdispatch.dylib 0x0000000183b671a8 _dispatch_client_callout + 12 10 libdispatch.dylib 0x0000000183b3ec8c _dispatch_block_invoke_direct$VARIANT$armv81 + 208 11 FrontBoardServices 0x0000000194a5d7d0 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 36 12 FrontBoardServices 0x0000000194a5ccdc -[FBSSerialQueue _targetQueue_performNextIfPossible] + 172 13 FrontBoardServices 0x0000000194a60e44 -[FBSSerialQueue _performNextFromRunLoopSource] + 20 14 CoreFoundation 0x0000000183ebb2b0 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 20 15 CoreFoundation 0x0000000183ecb2d8 __CFRunLoopDoSource0 + 200 16 CoreFoundation 0x0000000183e0e678 __CFRunLoopDoSources0 + 252 17 CoreFoundation 0x0000000183e13aa8 __CFRunLoopRun + 764 18 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 19 GraphicsServices 0x00000001a41d99a0 GSEventRunModal + 156 20 UIKitCore 0x000000018665ab90 -[UIApplication _run] + 1076 21 UIKitCore 0x00000001863f016c UIApplicationMain + 328 22 XXX 0x0000000102599810 main (main.swift:17) 23 ??? 0x0000000105bd0250 0x0 + 0

Thread 1: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 Foundation 0x00000001855613dc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 5 Foundation 0x000000018559fc4c -[NSRunLoop(NSRunLoop) runUntilDate:] + 84 6 UIKitCore 0x00000001865d88ac -[UIEventFetcher threadMain] + 508 7 Foundation 0x00000001855ad8bc NSThread__start + 788 8 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 9 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 3: 0 libsystem_kernel.dylib 0x00000001bdf494f0 __psynch_cvwait + 8 1 libc++.1.dylib 0x000000019b2a72b8 std::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 20 2 JavaScriptCore 0x000000018f48ca6c void std::__1::condition_variable_any::wait<std::__1::unique_lockbmalloc::Mutex >(std::__1::unique_lockbmalloc::Mutex&) + 104 3 JavaScriptCore 0x000000018f491528 bmalloc::Scavenger::threadRunLoop() + 376 4 JavaScriptCore 0x000000018f490edc bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 8 5 JavaScriptCore 0x000000018f49257c void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void ()(bmalloc::Scavenger), bmalloc::Scavenger*> >(void*) + 40 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 4: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 CFNetwork 0x000000018482cda8 _CFURLStorageSessionCopyIdentifier + 50212 5 Foundation 0x00000001855ad8bc NSThread__start + 788 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 5: 0 XXX 0x0000000102a67c14 mach_exception_callback (PLCrashReporter.m:296) 1 XXX 0x0000000102a7388c exception_server_thread (PLCrashMachExceptionServer.m:780) 2 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 3 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 6: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 CoreFoundation 0x0000000183ea1300 CFRunLoopRun + 56 5 XXX 0x0000000102aba548 -[BCNRunLoopThread threadLoop] (BCNRunLoopThread.m:113) 6 Foundation 0x00000001855ad8bc NSThread__start + 788 7 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 8 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 7: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 CoreFoundation 0x0000000183ea1300 CFRunLoopRun + 56 5 CoreMotion 0x00000001902c91d4 CLMotionActivity::isTypeInVehicle(CLMotionActivity::Type) + 21408 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 8: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 WebCore 0x0000000192dce128 RunWebThread(void*) + 764 5 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 6 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 9: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 AudioSession 0x000000018ca28d7c CADeprecated::GenericRunLoopThread::Entry(void*) + 152 5 AudioSession 0x000000018ca320ac CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 84 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 10: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 XXX 0x0000000104a0dcb4 +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:266) 5 Foundation 0x00000001855ad8bc NSThread__start + 788 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 11: 0 libsystem_kernel.dylib 0x00000001bdf490cc __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001de44b9f0 start_wqthread + 4

Thread 12: 0 libsystem_kernel.dylib 0x00000001bdf490cc __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001de44b9f0 start_wqthread + 4

Thread 13: 0 libsystem_kernel.dylib 0x00000001bdf490cc __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001de44b9f0 start_wqthread + 4

Thread 14: 0 libsystem_kernel.dylib 0x00000001bdf490cc __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001de44b9f0 start_wqthread + 4

Thread 15: 0 libsystem_pthread.dylib 0x00000001de44b9e8 start_wqthread + 0

Thread 16: 0 libsystem_kernel.dylib 0x00000001bdf490cc __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x00000001de44b9f0 start_wqthread + 4

Thread 17: 0 libsystem_kernel.dylib 0x00000001bdf494f0 __psynch_cvwait + 8 1 JavaScriptCore 0x000000018f415024 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 3000 2 JavaScriptCore 0x000000018ec2a068 bool WTF::Condition::waitUntilUncheckedWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 180 3 JavaScriptCore 0x000000018f3e1884 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 388 4 JavaScriptCore 0x000000018f439994 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 252 5 JavaScriptCore 0x000000018f43c2e0 WTF::wtfThreadEntryPoint(void*) + 8 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 18: 0 libsystem_kernel.dylib 0x00000001bdf494f0 __psynch_cvwait + 8 1 JavaScriptCore 0x000000018f415024 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 3000 2 JavaScriptCore 0x000000018ec2a068 bool WTF::Condition::waitUntilUncheckedWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 180 3 JavaScriptCore 0x000000018f3e1884 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 388 4 JavaScriptCore 0x000000018f439994 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 252 5 JavaScriptCore 0x000000018f43c2e0 WTF::wtfThreadEntryPoint(void*) + 8 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 19: 0 libsystem_kernel.dylib 0x00000001bdf494f0 __psynch_cvwait + 8 1 JavaScriptCore 0x000000018f415024 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 3000 2 JavaScriptCore 0x000000018ec2a068 bool WTF::Condition::waitUntilUncheckedWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 180 3 JavaScriptCore 0x000000018f3e1884 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 388 4 JavaScriptCore 0x000000018f439994 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 252 5 JavaScriptCore 0x000000018f43c2e0 WTF::wtfThreadEntryPoint(void*) + 8 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 20: 0 libsystem_kernel.dylib 0x00000001bdf494f0 __psynch_cvwait + 8 1 JavaScriptCore 0x000000018f415024 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 3000 2 JavaScriptCore 0x000000018ec2a068 bool WTF::Condition::waitUntilUncheckedWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 180 3 JavaScriptCore 0x000000018f3e1884 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 388 4 JavaScriptCore 0x000000018f439994 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 252 5 JavaScriptCore 0x000000018f43c2e0 WTF::wtfThreadEntryPoint(void*) + 8 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 21: 0 libsystem_kernel.dylib 0x00000001bdf494f0 __psynch_cvwait + 8 1 JavaScriptCore 0x000000018f415024 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 3000 2 JavaScriptCore 0x000000018ec2a068 bool WTF::Condition::waitUntilUncheckedWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 180 3 JavaScriptCore 0x000000018f3e1884 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 388 4 JavaScriptCore 0x000000018f439994 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 252 5 JavaScriptCore 0x000000018f43c2e0 WTF::wtfThreadEntryPoint(void*) + 8 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 22: 0 libsystem_kernel.dylib 0x00000001bdf494f0 __psynch_cvwait + 8 1 JavaScriptCore 0x000000018f415024 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 3000 2 JavaScriptCore 0x000000018ec2a068 bool WTF::Condition::waitUntilUncheckedWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 180 3 JavaScriptCore 0x000000018f3e1884 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 388 4 JavaScriptCore 0x000000018f439994 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 252 5 JavaScriptCore 0x000000018f43c2e0 WTF::wtfThreadEntryPoint(void*) + 8 6 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 7 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 23: 0 libsystem_kernel.dylib 0x00000001bdf48b10 mach_msg_trap + 8 1 CoreFoundation 0x0000000183e0fb60 __CFRunLoopServiceMachPort + 364 2 CoreFoundation 0x0000000183e13c48 __CFRunLoopRun + 1180 3 CoreFoundation 0x0000000183e26e1c CFRunLoopRunSpecific + 568 4 Foundation 0x00000001855613dc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 5 Foundation 0x0000000185561b50 -[NSRunLoop(NSRunLoop) run] + 84 6 SwiftUI 0x000000018b3cbb74 static SwiftUI.DisplayLink.(asyncThread in _D912470A6161D66810B373079EE9F26A)(arg: Any?) -> () + 588 7 SwiftUI 0x000000018b3c9da8 @objc static SwiftUI.DisplayLink.(asyncThread in _D912470A6161D66810B373079EE9F26A)(arg: Any?) -> () + 92 8 Foundation 0x00000001855ad8bc NSThread__start + 788 9 libsystem_pthread.dylib 0x00000001de44d3a4 _pthread_start + 112 10 libsystem_pthread.dylib 0x00000001de44b9fc thread_start + 4

Thread 2 crashed with arm64 Thread State: x21: 0x00000001f600d000 x2: 0x000000016dcc61e8 x16: 0x0000000000000148 x3: 0x00000001057e012f x22: 0x0000000282e341d0 x4: 0x000000016dcc6100 x17: 0x000000019b20cbec cpsr: 0x0000000060000000 x5: 0x7a18a451bb41c60a x23: 0x000000010bc2c670 x6: 0x0000000000000000 x18: 0x0000000000000000 x10: 0x000041a10571a2a1 lr: 0x0000000102a6407c x7: 0x0000000000000000 x24: 0x00000001057733d0 x11: 0x0000000000000001 x8: 0x0000000282c3e0e0 x19: 0x00000001057e4a30 x25: 0x00000002804358f0 x9: 0x0000d0dc560fe0e0 x12: 0x00000000000000ba fp: 0x000000016dcc6120 x26: 0x000000003a71d93d x13: 0x00000000f6a5301a pc: 0x0000000c560fe0e0 x27: 0x000000028094c420 x14: 0x00000000f6c53800 x20: 0x000000016dcc61e8 x0: 0x0000000000000006 sp: 0x000000016dcc6100 x28: 0x00000001057733d0 x15: 0x0000000000053800 x1: 0x000000016dcc6180

Binary Images: 0x0000000102594000 - 0x00000001053bbfff +XXX arm64 /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/XXX 0x0000000105ba4000 - 0x0000000105babfff +MSMapNavigationTelemetryAria arm64 /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/Frameworks/MSMapNavigationTelemetryAria.framework/MSMapNavigationTelemetryAria 0x0000000105e0c000 - 0x0000000105e8ffff +AriaObjC arm64 /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/Frameworks/AriaObjC.framework/AriaObjC 0x0000000105f0c000 - 0x000000010681ffff +MicrosoftCognitiveServicesSpeech arm64 /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/Frameworks/MicrosoftCognitiveServicesSpeech.framework/MicrosoftCognitiveServicesSpeech 0x0000000106b74000 - 0x0000000106b8ffff +MicrosoftMapsMicrosoftTextToSpeech arm64 /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/Frameworks/MicrosoftMapsMicrosoftTextToSpeech.framework/MicrosoftMapsMicrosoftTextToSpeech 0x0000000106bd0000 - 0x00000001079f7fff +MicrosoftMapsNavigation arm64 <976d81dfa64e3143973c9b20e23c1231> /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/Frameworks/MicrosoftMapsNavigation.framework/MicrosoftMapsNavigation 0x0000000109bf4000 - 0x0000000109c0ffff +MicrosoftNavigationGPSTrace arm64 /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/Frameworks/MicrosoftNavigationGPSTrace.framework/MicrosoftNavigationGPSTrace 0x0000000109c4c000 - 0x0000000109c63fff +SSZipArchive arm64 /private/var/containers/Bundle/Application/9401C3DE-11F3-4E1C-AF23-E548A52E6A3D/XXX.app/Frameworks/SSZipArchive.framework/SSZipArchive 0x0000000183b03000 - 0x0000000183b85fff libdispatch.dylib arm64 <95d85335dd46355e905c3743a10000ec> /usr/lib/system/libdispatch.dylib 0x0000000183e09000 - 0x0000000184243fff CoreFoundation arm64 <31e5ca686ca430d5ad16bb231341e9bd> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x00000001845e0000 - 0x0000000184a76fff CFNetwork arm64 <08d2fd8e18ba388aa4f751847e1320c4> /System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x000000018554a000 - 0x000000018582afff Foundation arm64 <179bd0b75dfd3c78ad7995903b08368f> /System/Library/Frameworks/Foundation.framework/Foundation 0x000000018616f000 - 0x00000001878fffff UIKitCore arm64 <263d772ff5f73c3aa6229b78cc000f53> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore 0x000000018b326000 - 0x000000018c12cfff SwiftUI arm64 /System/Library/Frameworks/SwiftUI.framework/SwiftUI 0x000000018ca23000 - 0x000000018ca4afff AudioSession arm64 <3a41b05f7ae93860bab3c332b4f60233> /System/Library/PrivateFrameworks/AudioSession.framework/AudioSession 0x000000018e37c000 - 0x000000018e3f6fff libsystem_c.dylib arm64 /usr/lib/system/libsystem_c.dylib 0x000000018e44a000 - 0x000000018f59cfff JavaScriptCore arm64 <6575846041313599b1695cdeadbac304> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore 0x00000001902b7000 - 0x00000001905a3fff CoreMotion arm64 <03f246e3bedf3b11a8c483a389b032ff> /System/Library/Frameworks/CoreMotion.framework/CoreMotion 0x0000000192263000 - 0x0000000194576fff WebCore arm64 <2ab40fc15815354bac24edaadc3ba150> /System/Library/PrivateFrameworks/WebCore.framework/WebCore 0x0000000194a53000 - 0x0000000194af1fff FrontBoardServices arm64 /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices 0x000000019b200000 - 0x000000019b235fff libobjc.A.dylib arm64 <4482d82d5ff13bd888bfd2362390bf90> /usr/lib/libobjc.A.dylib 0x000000019b29e000 - 0x000000019b2f6fff libc++.1.dylib arm64 /usr/lib/libc++.1.dylib 0x000000019b2f7000 - 0x000000019b30ffff libc++abi.dylib arm64 <3e939a40c4a63c299d1c492f6a0827d8> /usr/lib/libc++abi.dylib 0x00000001a41d8000 - 0x00000001a41e0fff GraphicsServices arm64 /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices 0x00000001bdf48000 - 0x00000001bdf79fff libsystem_kernel.dylib arm64 <08261c25a69d30008b160bd52c550c2a> /usr/lib/system/libsystem_kernel.dylib 0x00000001de43a000 - 0x00000001de445fff libsystem_platform.dylib arm64 <941f317478ba30abb0ae75a5093a3102> /usr/lib/system/libsystem_platform.dylib 0x00000001de447000 - 0x00000001de45afff libsystem_pthread.dylib arm64 <0ea7fd14068d337593bd656fe7f73028> /usr/lib/system/libsystem_pthread.dylib

iCodeWoods avatar Apr 25 '22 03:04 iCodeWoods

@iCodeWoods - Is this crash happening during shutdown. If yes, please refer to use-after-free document in the docs folder for proper shutdown of SDK.

lalitb avatar Apr 26 '22 20:04 lalitb

@iCodeWoods - Is this crash happening during shutdown. If yes, please refer to use-after-free document in the docs folder for proper shutdown of SDK.

Thanks @lalitb , I saw this document. However, there are still some doubts about the actual operation. Can you give me a demo code?

iCodeWoods avatar Apr 27 '22 03:04 iCodeWoods

@lalitb Another question is, if I call the PauseActivity, WaitPause methods mentioned in the documentation to stop the log, will the log be lost? Or will it be sent again next time it starts up?

iCodeWoods avatar Apr 27 '22 07:04 iCodeWoods

@iCodeWoods LoghManager::FlushAndTearDown would called PauseActivity and WaitPause. Can you ensure calling LogManager::Flush() followed by LogManager::FlushAndTearDown() before shutdown? And yes, any logs after calling FlushAndTearDown would be lost.

lalitb avatar May 03 '22 05:05 lalitb

@iCodeWoods - Did above suggestion worked, or if you are still seeing the issue?

lalitb avatar Jul 07 '22 23:07 lalitb

@iCodeWoods - Did above suggestion worked, or if you are still seeing the issue?

Hi @lalitb

I have revised it and will release a new version next week, then I will update to see if it has been fixed.

But even if it is fixed, I would suggest that the SDK should fix this itself rather than letting users fix it themselves

iCodeWoods avatar Jul 13 '22 03:07 iCodeWoods

But even if it is fixed, I would suggest that the SDK should fix this itself rather than letting users fix it themselves

Yes, agree. This is what the v4 release is planned for. As of now, the guidelines are to ensure that there is no event flow during the shutdown.

lalitb avatar Jul 14 '22 21:07 lalitb

@iCodeWoods - Would like to close this issue for incorrect usage of the SDK - not calling LogManager::FlushAndTeardown() before app shutdown. In pre-v4 era, this method needs to be called, otherwise, the behavior is undefined (including crash).

Please reopen the issue if you still see the crash with this method.

lalitb avatar Jul 26 '22 06:07 lalitb

Hi @lalitb , I tried adding these fixes for the crash, but it introduced another issue.

I attempted two approaches:

  1. I called ODWLogManager's applicationWillTerminate(It's pauseTransmission and flushAndTeardown actually) inside the system's applicationWillTerminate
  2. I called LogManager::Flush() and LogManager::FlushAndTeardown() inside the system's applicationWillTerminate

Both of these approaches resulted in a new issue. If we force quit the app and quickly restart it (within 0.5s to 1s), the app's launch screen takes a very long time (>2s) to appear. However, if we remove the code in applicationWillTerminate, everything works fine.

Do you have any ideas on this?

iCodeWoods avatar Jun 30 '23 10:06 iCodeWoods

@lalitb There is an important issue, as mentioned in the documentation, that use_after_free occurs in a multi-threaded concurrent scenario when the app has already been terminated and we are still attempting to send telemetry on a background thread.

The documentation suggests calling FlushAndTeardown and similar methods in applicationWillTerminate. However, applicationWillTerminate is called on the main thread, and if we switch asynchronously to the telemetry's working thread at this point, the asynchronous operation is not guaranteed to complete because the app is about to be terminated. On the other hand, if we execute FlushAndTeardown synchronously, it creates a concurrency issue with sending telemetry on a background thread, and it seems that it cannot guarantee crash-free execution. image

iCodeWoods avatar Jul 03 '23 06:07 iCodeWoods