Open LuCaiOS opened 2 years ago
类似的问题还有一个上报 `1 libsystem_kernel.dylib ___psynch_mutexwait (in libsystem_kernel.dylib)
2 libsystem_pthread.dylib __pthread_mutex_firstfit_lock_wait (in libsystem_pthread.dylib)
3 libsystem_pthread.dylib __pthread_mutex_firstfit_lock_slow (in libsystem_pthread.dylib)
4 Foundation -[NSRecursiveLock lock] (in Foundation)
5 pregnancy -[KTVHCDataUnit lock] (in pregnancy:KTVHCDataUnit.m:338)
6 pregnancy -[KTVHCDataUnit encodeWithCoder:] (in pregnancy:KTVHCDataUnit.m:60)
7 Foundation __encodeObject (in Foundation)
8 Foundation -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] (in Foundation)
9 Foundation -[NSArray(NSArray) encodeWithCoder:] (in Foundation)
10 Foundation __encodeObject (in Foundation)
11 Foundation +[NSKeyedArchiver archiveRootObject:toFile:] (in Foundation)
12 pregnancy -[KTVHCDataUnitQueue archive] (in pregnancy:KTVHCDataUnitQueue.m:89)
13 pregnancy -[KTVHCDataUnitPool archiveIfNeeded] (in pregnancy:KTVHCDataUnitPool.m:249)
14 CoreFoundation _CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER (in CoreFoundation)
15 CoreFoundation ____CFXRegistrationPost_block_invoke (in CoreFoundation)
16 CoreFoundation __CFXRegistrationPost (in CoreFoundation)
17 CoreFoundation __CFXNotificationPost (in CoreFoundation)
18 Foundation -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
19 UIKitCore ___47-[UIApplication _applicationDidEnterBackground]_block_invoke (in UIKitCore)`
我们在APM监测到这个库导致了很多卡死,看日志是因为递归锁导致的多线程访问锁等待导致的卡死问题。
libsystem_kernel.dylib ___psynch_mutexwait (in libsystem_kernel.dylib)
libsystem_pthread.dylib __pthread_mutex_firstfit_lock_wait (in libsystem_pthread.dylib)
libsystem_pthread.dylib __pthread_mutex_firstfit_lock_slow (in libsystem_pthread.dylib)
Foundation -[NSRecursiveLock lock] (in Foundation)
pregnancy -[KTVHCDataUnitPool lock] (in pregnancy:KTVHCDataUnitPool.m:285)
pregnancy -[KTVHCDataUnitPool archiveIfNeeded] (in pregnancy:KTVHCDataUnitPool.m:246)
CoreFoundation _CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER (in CoreFoundation)
CoreFoundation ____CFXRegistrationPost_block_invoke (in CoreFoundation)
CoreFoundation __CFXRegistrationPost (in CoreFoundation)
CoreFoundation __CFXNotificationPost (in CoreFoundation)
Foundation -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
UIKitCore -[UIApplication _deactivateForReason:notify:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] (in UIKitCore)
UIKitCore ___186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke (in UIKitCore)
UIKitCore +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] (in UIKitCore)
UIKitCore __UISceneSettingsDiffActionPerformChangesWithTransitionContext (in UIKitCore)
UIKitCore -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] (in UIKitCore)
UIKitCore __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.615 (in UIKitCore)
UIKitCore -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] (in UIKitCore)
UIKitCore -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] (in UIKitCore)
UIKitCore -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] (in UIKitCore) `