iOS16 [MXMetricManager deliverMetricPayload:] Crash

We have use MetricKit API when app was launched.

[[MXMetricManager sharedManager] addSubscriber:self];

the exception is here.

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 27
Last Exception Backtrace:
0 CoreFoundation 0x18dbae248 __exceptionPreprocess + 164 (NSException.m:202)
1 libobjc.A.dylib 0x186fc3a68 objc_exception_throw + 60 (objc-exception.mm:356)
2 CoreFoundation 0x18dd19fec __NSFastEnumerationMutationHandler + 116 (NSEnumerator.m:130)
3 Foundation 0x18804d828 -[NSConcreteHashTable countByEnumeratingWithState:objects:count:] + 76 (NSHashTable.m:577)
4 MetricKit 0x1fddf8868 -[MXMetricManager deliverMetricPayload:] + 408 (MXMetricManager.m:336)
5 Foundation 0x1880b66c8 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 16 (NSXPCConnection.m:189)
6 Foundation 0x188686e34 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:reply:flags:] + 1644 (NSXPCConnection.m:705)
7 Foundation 0x188688608 message_handler_message + 88 (NSXPCConnection.m:826)
8 Foundation 0x188688074 message_handler + 152 (NSXPCConnection.m:797)
9 libxpc.dylib 0x1da21a18c _xpc_connection_call_event_handler + 152 (connection.c:834)
10 libxpc.dylib 0x1da21a5bc _xpc_connection_mach_event + 992 (connection.c:1445)
11 libdispatch.dylib 0x194ff609c _dispatch_client_callout4 + 20 (object.m:600)
12 libdispatch.dylib 0x195012830 _dispatch_mach_msg_invoke + 468 (mach.c:2462)
13 libdispatch.dylib 0x194ffd56c _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
14 libdispatch.dylib 0x19501354c _dispatch_mach_invoke + 448 (mach.c:2784)
15 libdispatch.dylib 0x194ffd56c _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
16 libdispatch.dylib 0x194ffe214 _dispatch_lane_invoke + 436 (queue.c:3940)
17 libdispatch.dylib 0x195008e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
18 libsystem_pthread.dylib 0x1da1c5df8 _pthread_wqthread + 288 (pthread.c:2618)
19 libsystem_pthread.dylib 0x1da1c5b98 start_wqthread + 8

how to fix this issues?

Answered by DTS Engineer in 731940022

The above indicates:

  • It’s a bug.

  • It’s reported as fixed in iOS 16.1 beta.

  • The workaround is to limit your app to a single subscriber.

What “further analysis” are you looking for?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

We have use MetricKit API when app was launched.

the exception is here.

Please post a full crash report. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

We have the same crash。

Application Specific Information: *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <NSConcreteHashTable: 0x281e7f430> was mutated while being enumerated UserInfo:(null)'

We have the same crash

Interesting.

Any chance you can post a full crash report as well? The crash report from rbbtsn0w is a bit weird — it looks like some of the symbols in their code were deliberately obfuscated — and I might be able to learn more from a second report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Seeing this here as we're getting alerted due to a spike in crashes due to this issue since the public release of iOS 16.

Full crash report attached.

Incident Identifier: D5097CF2-5BE0-4826-8377-160CA5257245
Hardware Model:      iPhone13,4
Process:             RedactedAppName [8081]
Path:                /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/RedactedAppName
Identifier:          com.example.redacted
Version:             2.0 (100)
AppStoreTools:       14A305
AppVariant:          1:iPhone13,4:15
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.example.redacted [1755]

Date/Time:           2022-09-16 08:42:51.4521 -0400
Launch Time:         2022-09-16 06:19:00.5806 -0400
OS Version:          iPhone OS 16.0 (20A362)
Release Type:        User
Baseband Version:    3.07.00
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  2

Last Exception Backtrace:
0   CoreFoundation                	0x1a6506248 __exceptionPreprocess + 164 (NSException.m:202)
1   libobjc.A.dylib               	0x19f8cba68 objc_exception_throw + 60 (objc-exception.mm:356)
2   CoreFoundation                	0x1a6671fec __NSFastEnumerationMutationHandler + 116 (NSEnumerator.m:130)
3   Foundation                    	0x1a0955828 -[NSConcreteHashTable countByEnumeratingWithState:objects:count:] + 76 (NSHashTable.m:577)
4   MetricKit                     	0x216b58868 -[MXMetricManager deliverMetricPayload:] + 408 (MXMetricManager.m:336)
5   Foundation                    	0x1a09be6c8 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 16 (NSXPCConnection.m:189)
6   Foundation                    	0x1a0f8ee34 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:reply:flags:] + 1644 (NSXPCConnection.m:705)
7   Foundation                    	0x1a0f90608 message_handler_message + 88 (NSXPCConnection.m:826)
8   Foundation                    	0x1a0f90074 message_handler + 152 (NSXPCConnection.m:797)
9   libxpc.dylib                  	0x1f2e7918c _xpc_connection_call_event_handler + 152 (connection.c:834)
10  libxpc.dylib                  	0x1f2e795bc _xpc_connection_mach_event + 992 (connection.c:1445)
11  libdispatch.dylib             	0x1ad98209c _dispatch_client_callout4 + 20 (object.m:600)
12  libdispatch.dylib             	0x1ad99e830 _dispatch_mach_msg_invoke + 468 (mach.c:2462)
13  libdispatch.dylib             	0x1ad98956c _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
14  libdispatch.dylib             	0x1ad99f54c _dispatch_mach_invoke + 448 (mach.c:2784)
15  libdispatch.dylib             	0x1ad98956c _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
16  libdispatch.dylib             	0x1ad98a214 _dispatch_lane_invoke + 436 (queue.c:3940)
17  libdispatch.dylib             	0x1ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
18  libsystem_pthread.dylib       	0x1f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
19  libsystem_pthread.dylib       	0x1f2e24b98 start_wqthread + 8

Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib        	0x00000001e2be8680 __ulock_wait + 8
1   libdispatch.dylib             	0x00000001ad9829cc _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib             	0x00000001ad9826c8 _dispatch_wait_on_address + 140 (lock.c:368)
3   libdispatch.dylib             	0x00000001ad982d7c _dispatch_group_wait_slow + 56 (semaphore.c:214)
4   libswiftDispatch.dylib        	0x00000001aeb44efc OS_dispatch_group.wait(wallTimeout:) + 24 (Dispatch.swift:165)
5   Experimentation             	0x000000010ca88c30 specialized ExperimentsManager.finishUp(fetchDispatchGroup:asynchronously:timeout:fetchCompletion:) + 2132 (ExperimentsManager.swift:711)
6   Experimentation             	0x000000010ca80660 finishUp + 32 (ExperimentsManager.swift:0)
7   Experimentation             	0x000000010ca80660 ExperimentsManager.privateFetchExperiments(withDescriptor:uniqueId:asynchronously:timeout:completion:) + 1728
8   Experimentation             	0x000000010ca7fcd0 fetchSynchronously + 32 (ExperimentsManager.swift:209)
9   Experimentation             	0x000000010ca7fcd0 ExperimentsManager.fetchTreatmentNameSynchronously(withDescriptor:uniqueId:timeout:experimentId:forcedTreatmentName:trackingEventName:) + 292 (ExperimentsManager.swift:167)
10  RedactedAppName                    	0x00000001043aedd4 fetchTreatmentNameSynchronously + 88 (ApplicationExperiments.swift:234)
11  RedactedAppName                    	0x00000001043aedd4 fetchTreatmentNameSynchronously + 88 (ApplicationExperiments.swift:179)
12  RedactedAppName                    	0x00000001043aedd4 specialized FeatureExperiment.fetchTreatment() + 484 (FeatureExperiment.swift:70)
13  RedactedAppName                    	0x00000001043aeeb4 fetchTreatment + 4 (:0)
14  RedactedAppName                    	0x00000001043aeeb4 specialized FeatureExperiment.isEnabled.getter + 44 (FeatureExperiment.swift:32)
15  RedactedAppName                    	0x000000010437f908 isEnabled.get + 4 (:0)
16  RedactedAppName                    	0x000000010437f908 isFeatureEnabled.get + 48 (CustomUniversalAppDelegate+Feature.swift:41)
17  RedactedAppName                    	0x000000010437f908 @objc CustomUniversalAppDelegate.isFeatureEnabled.getter + 80 (:40)
18  RedactedAppName                    	0x00000001046f5cbc updateApplicationBadgeNumber + 12 (CustomUniversalAppDelegate+NotificationHelper.swift:15)
19  RedactedAppName                    	0x00000001046f5cbc @objc CustomUniversalAppDelegate.updateApplicationBadgeNumber() + 32 (:14)
20  RedactedAppName                    	0x0000000105f89680 -[CustomUniversalAppDelegate applicationDidBecomeActive:] + 124 (CustomUniversalAppDelegate.m:282)
21  PerformanceUtil           	0x00000001073f02d4 -[UIApplication(instrumentation) ADEumApplicationDidBecomeActive:] + 188 (UIApplication+Instrumentation.m:70)
22  UIKitCore                     	0x00000001a891bdec -[UIApplication _stopDeactivatingForReason:] + 1196 (UIApplication.m:2104)
23  UIKitCore                     	0x00000001a891b8c4 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 280 (_UISceneLifecycleMultiplexer.m:124)
24  UIKitCore                     	0x00000001a891b6b0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 620 (_UISceneLifecycleMultiplexer.m:563)
25  UIKitCore                     	0x00000001a891b260 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 252 (_UISceneLifecycleMultiplexer.m:469)
26  UIKitCore                     	0x00000001a891b12c __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 148 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:73)
27  UIKitCore                     	0x00000001a8ff95a0 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736 (BSAnimationSettings+UIKit.m:54)
28  UIKitCore                     	0x00000001a909196c _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224 (_UISceneSettingsDiffAction.m:27)
29  UIKitCore                     	0x00000001a87c72d8 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316 (_UISceneSettingsDiffAction.m:20)
30  UIKitCore                     	0x00000001a8c39048 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.215 + 556 (UIScene.m:1986)
31  UIKitCore                     	0x00000001a8899bec -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216 (UIScene.m:1662)
32  UIKitCore                     	0x00000001a8899a5c -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244 (UIScene.m:1948)
33  UIKitCore                     	0x00000001a889989c -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 336 (UIApplicationSceneClientAgent.m:86)
34  FrontBoardServices            	0x00000001bbe72524 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 420 (FBSScene.m:553)
35  FrontBoardServices            	0x00000001bbe72360 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 144 (FBSWorkspaceScenesClient.m:575)
36  FrontBoardServices            	0x00000001bbe75ae4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 (FBSWorkspace.m:359)
37  FrontBoardServices            	0x00000001bbe75a00 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 340 (FBSWorkspaceScenesClient.m:574)
38  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
39  libdispatch.dylib             	0x00000001ad985a5c _dispatch_block_invoke_direct + 264 (queue.c:496)
40  FrontBoardServices            	0x00000001bbe7ff2c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52 (FBSSerialQueue.m:157)
41  FrontBoardServices            	0x00000001bbe7fac8 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
42  FrontBoardServices            	0x00000001bbe822a8 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
43  CoreFoundation                	0x00000001a65d222c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1974)
44  CoreFoundation                	0x00000001a65de614 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2018)
45  CoreFoundation                	0x00000001a656257c __CFRunLoopDoSources0 + 340 (CFRunLoop.c:2063)
46  CoreFoundation                	0x00000001a6577eb8 __CFRunLoopRun + 836 (CFRunLoop.c:2970)
47  CoreFoundation                	0x00000001a657d1e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
48  GraphicsServices              	0x00000001df39d368 GSEventRunModal + 164 (GSEvent.c:2196)
49  UIKitCore                     	0x00000001a8a2cd88 -[UIApplication _run] + 888 (UIApplication.m:3726)
50  UIKitCore                     	0x00000001a8a2c9ec UIApplicationMain + 340 (UIApplication.m:5316)
51  RedactedAppName                    	0x0000000105f8d2a0 main + 180 (main.m:33)
52  dyld                          	0x00000001c48a1948 start + 2504 (dyldMain.cpp:1168)

Thread 1:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 2 name:
Thread 2 Crashed:
0   libsystem_kernel.dylib        	0x00000001e2bee200 __pthread_kill + 8
1   libsystem_pthread.dylib       	0x00000001f2e2b1ac pthread_kill + 268 (pthread.c:1670)
2   libsystem_c.dylib             	0x00000001ada3d3f4 __abort + 128 (abort.c:155)
3   libsystem_c.dylib             	0x00000001ad9e5cac abort + 192 (abort.c:126)
4   libc++abi.dylib               	0x00000001f2d6db8c abort_message + 132 (abort_message.cpp:78)
5   libc++abi.dylib               	0x00000001f2d5da80 demangling_terminate_handler() + 336 (cxa_default_handlers.cpp:71)
6   libobjc.A.dylib               	0x000000019f8d1eec _objc_terminate() + 144 (objc-exception.mm:498)
7   RedactedAppName                    	0x000000010480e37c FIRCLSTerminateHandler() + 340 (FIRCLSException.mm:327)
8   libc++abi.dylib               	0x00000001f2d6cf28 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
9   libc++abi.dylib               	0x00000001f2d6cec4 std::terminate() + 56 (cxa_handlers.cpp:88)
10  libdispatch.dylib             	0x00000001ad9820b0 _dispatch_client_callout4 + 40 (object.m:603)
11  libdispatch.dylib             	0x00000001ad99e830 _dispatch_mach_msg_invoke + 468 (mach.c:2462)
12  libdispatch.dylib             	0x00000001ad98956c _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
13  libdispatch.dylib             	0x00000001ad99f54c _dispatch_mach_invoke + 448 (mach.c:2784)
14  libdispatch.dylib             	0x00000001ad98956c _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
15  libdispatch.dylib             	0x00000001ad98a214 _dispatch_lane_invoke + 436 (queue.c:3940)
16  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
17  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
18  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 3 name:
Thread 3:
0   libobjc.A.dylib               	0x000000019f8bd610 prepareMethodLists(objc_class*, method_list_t**, int, bool, bool, char const*) + 196 (objc-runtime-new.h:690)
1   libobjc.A.dylib               	0x000000019f8c5740 realizeClassWithoutSwift(objc_class*, objc_class*) + 2032 (objc-runtime-new.mm:1527)
2   libobjc.A.dylib               	0x000000019f8d865c realizeClassMaybeSwiftMaybeRelock(objc_class*, locker_mixin >&, bool) + 404 (objc-runtime-new.mm:2884)
3   libobjc.A.dylib               	0x000000019f8ddf90 realizeAllClasses() + 176 (objc-runtime-new.mm:2907)
4   libobjc.A.dylib               	0x000000019f8df72c objc_copyClassList + 76 (objc-runtime-new.mm:5222)
5   Realm                         	0x000000010e47bddc +[RLMSchema sharedSchema] + 92 (RLMSchema.mm:294)
6   Realm                         	0x000000010e46e438 +[RLMRealm realmWithConfiguration:queue:error:] + 1768 (RLMRealm.mm:557)
7   RealmSwift                    	0x000000010eab62f0 init + 40 (:0)
8   RealmSwift                    	0x000000010eab62f0 init + 40 (:0)
9   RealmSwift                    	0x000000010eab62f0 Realm.init(configuration:queue:) + 92 (Realm.swift:95)
10  ReliableTransmission          	0x000000010eb86404 closure #1 in closure #1 in DefaultItemStore.insert(item:completionHandler:) + 276 (DefaultItemStore.swift:75)
11  ReliableTransmission          	0x000000010eb8c304 partial apply for thunk for @callee_guaranteed () -> (@error @owned Error) + 20 (:0)
12  ReliableTransmission          	0x000000010eb8cf5c thunk for @callee_guaranteed () -> (@error @owned Error)partial apply + 12
13  libswiftObjectiveC.dylib      	0x00000001ccd1c308 autoreleasepool<a>(invoking:) + 64 (ObjectiveC.swift:184)
14  ReliableTransmission          	0x000000010eb8cc4c partial apply for closure #1 in DefaultItemStore.insert(item:completionHandler:) + 80 (DefaultItemStore.swift:130)
15  ReliableTransmission          	0x000000010eb90428 thunk for @escaping @callee_guaranteed () -> () + 28 (:0)
16  libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
17  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
18  libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
19  libdispatch.dylib             	0x00000001ad98a1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
20  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
21  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
22  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 4 name:
Thread 4:
0   libsystem_kernel.dylib        	0x00000001e2be7ac4 semaphore_wait_trap + 8
1   libdispatch.dylib             	0x00000001ad982578 _dispatch_sema4_wait + 28 (lock.c:139)
2   libdispatch.dylib             	0x00000001ad982c2c _dispatch_semaphore_wait_slow + 132 (semaphore.c:132)
3   libswiftDispatch.dylib        	0x00000001aeb4495c OS_dispatch_semaphore.wait(wallTimeout:) + 24 (Dispatch.swift:189)
4   Authorization           	0x0000000109d953e8 specialized AuthMetricsCoreDataManager.runWorkerActions</a><a>(actions:) + 884 (AuthMetricsCoreDataManager.swift:185)
5   Authorization           	0x0000000109d91a64 getStatus + 36 (AuthMetricsCoreDataManager.swift:150)
6   Authorization           	0x0000000109d91a64 AuthMetricsApiManager.triggerSendIfNeeded() + 168 (AuthMetricsApiManager.swift:610)
7   Authorization           	0x0000000109d90260 closure #1 in AuthMetricsApiManager.logAsync(creationDate:event:attributes:completionQueue:completion:) + 3868 (AuthMetricsApiManager.swift:170)
8   Authorization           	0x0000000109d96efc partial apply for closure #1 in AuthMetricsApiManager.logAsync(creationDate:event:attributes:completionQueue:completion:) + 96 (:0)
9   Authorization           	0x0000000109d66744 thunk for @escaping @callee_guaranteed () -> () + 28 (:0)
10  libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
11  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
12  libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
13  libdispatch.dylib             	0x00000001ad98a1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
14  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
15  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
16  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib        	0x00000001e2be7ac4 semaphore_wait_trap + 8
1   libdispatch.dylib             	0x00000001ad982578 _dispatch_sema4_wait + 28 (lock.c:139)
2   libdispatch.dylib             	0x00000001ad982c2c _dispatch_semaphore_wait_slow + 132 (semaphore.c:132)
3   CFNetwork                     	0x00000001a76e138c CFURLConnectionSendSynchronousRequest + 356 (CFURLConnection_Synchronous.c:209)
4   CFNetwork                     	0x00000001a777d9f4 +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 296 (NSURLConnection.mm:497)
5   PerformanceUtil           	0x00000001073e4cd4 +[NSURLConnection(Instrumentation) ADEumSendSynchronousRequest:returningResponse:error:instrument:] + 940 (NSURLConnection+Instrumentation.m:241)
6   PerformanceUtil           	0x00000001073d9230 -[ADEumCollectorService sendBeacons:] + 1248 (ADEumCollectorService.m:116)
7   PerformanceUtil           	0x00000001073d5460 -[ADEumBeaconDispatcher sendBeaconsToCollector:] + 312 (ADEumBeaconDispatcher.m:146)
8   PerformanceUtil           	0x00000001073d5138 __40-[ADEumBeaconDispatcher flushBeaconsNow]_block_invoke + 304 (ADEumBeaconDispatcher.m:117)
9   libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
10  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
11  libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
12  libdispatch.dylib             	0x00000001ad98a1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
13  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
14  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
15  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 6 name:
Thread 6:
0   libsystem_kernel.dylib        	0x00000001e2be8680 __ulock_wait + 8
1   libsystem_platform.dylib      	0x00000001f2d9082c _os_unfair_lock_lock_slow + 172 (lock.c:578)
2   libobjc.A.dylib               	0x000000019f8b9710 look_up_class + 84 (lock_private.h:716)
3   CoreFoundation                	0x00000001a651ce3c -[NSInvocation invoke] + 188 (NSForwarding.m:3360)
4   Foundation                    	0x00000001a09e4d38 __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ + 16 (NSXPCConnection.m:170)
5   Foundation                    	0x00000001a09b62fc -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 520 (NSXPCConnection.m:316)
6   Foundation                    	0x00000001a0f90f44 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_5 + 188 (NSXPCConnection.m:1662)
7   Foundation                    	0x00000001a09799fc -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2300 (NSXPCConnection.m:1679)
8   Foundation                    	0x00000001a09c4884 -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:arg3:arg4:] + 144 (NSXPCConnection.m:1320)
9   Foundation                    	0x00000001a09c479c _NSXPCDistantObjectSimpleMessageSend4 + 84 (NSXPCDistantObject.m:292)
10  CoreTelephony                 	0x00000001a7a423a8 -[CoreTelephonyClient(CarrierBundle) copyCarrierBundleValue:key:bundleType:error:] + 392 (CoreTelephonyClient+CarrierBundle.mm:72)
11  CoreTelephony                 	0x00000001a7a437d4 -[CTTelephonyNetworkInfo getAllowsVOIP:forContext:withError:] + 116 (CTTelephonyNetworkInfo.mm:510)
12  CoreTelephony                 	0x00000001a7a41c50 -[CTTelephonyNetworkInfo updateNetworkInfoAndShouldNotifyClient:forContext:] + 992 (CTTelephonyNetworkInfo.mm:562)
13  CoreTelephony                 	0x00000001a7a41674 -[CTTelephonyNetworkInfo initWithClient:] + 544 (CTTelephonyNetworkInfo.mm:295)
14  CoreTelephony                 	0x00000001a7a4141c -[CTTelephonyNetworkInfo init] + 96 (CTTelephonyNetworkInfo.mm:256)
15  KochavaTracker                	0x000000010fd37d54 0x10fce0000 + 359764
16  KochavaCore                   	0x000000010fc5dbfc 0x10fc40000 + 121852
17  KochavaCore                   	0x000000010fc5eb24 0x10fc40000 + 125732
18  KochavaCore                   	0x000000010fc595c0 0x10fc40000 + 103872
19  KochavaCore                   	0x000000010fc48f24 0x10fc40000 + 36644
20  KochavaCore                   	0x000000010fc486c0 0x10fc40000 + 34496
21  libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
22  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
23  libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
24  libdispatch.dylib             	0x00000001ad98a1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
25  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
26  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
27  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib        	0x00000001e2be7b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	0x00000001e2bfa008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib        	0x00000001e2bfa248 mach_msg_overwrite + 388 (mach_msg.c:0)
3   libsystem_kernel.dylib        	0x00000001e2be808c mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                	0x00000001a6576e00 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2639)
5   CoreFoundation                	0x00000001a6578044 __CFRunLoopRun + 1232 (CFRunLoop.c:3022)
6   CoreFoundation                	0x00000001a657d1e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
7   Foundation                    	0x00000001a0985818 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8   Foundation                    	0x00000001a0985700 -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
9   UIKitCore                     	0x00000001a8b6188c -[UIEventFetcher threadMain] + 436 (UIEventFetcher.m:1212)
10  Foundation                    	0x00000001a099ece8 __NSThread__start__ + 716 (NSThread.m:968)
11  libsystem_pthread.dylib       	0x00000001f2e256cc _pthread_start + 148 (pthread.c:893)
12  libsystem_pthread.dylib       	0x00000001f2e24ba4 thread_start + 8

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib        	0x00000001e2be7b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	0x00000001e2bfa008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib        	0x00000001e2bfa248 mach_msg_overwrite + 388 (mach_msg.c:0)
3   libsystem_kernel.dylib        	0x00000001e2be808c mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                	0x00000001a6576e00 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2639)
5   CoreFoundation                	0x00000001a6578044 __CFRunLoopRun + 1232 (CFRunLoop.c:3022)
6   CoreFoundation                	0x00000001a657d1e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
7   CFNetwork                     	0x00000001a78cbbac +[__CFN_CoreSchedulingSetRunnable _run:] + 392 (CoreSchedulingSet.mm:1372)
8   Foundation                    	0x00000001a099ece8 __NSThread__start__ + 716 (NSThread.m:968)
9   libsystem_pthread.dylib       	0x00000001f2e256cc _pthread_start + 148 (pthread.c:893)
10  libsystem_pthread.dylib       	0x00000001f2e24ba4 thread_start + 8

Thread 9:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 10 name:
Thread 10:
0   libsystem_kernel.dylib        	0x00000001e2be7adc semaphore_timedwait_trap + 8
1   libdispatch.dylib             	0x00000001ad9825f4 _dispatch_sema4_timedwait + 64 (lock.c:154)
2   libdispatch.dylib             	0x00000001ad982bf4 _dispatch_semaphore_wait_slow + 76 (semaphore.c:116)
3   libswiftDispatch.dylib        	0x00000001aeb4495c OS_dispatch_semaphore.wait(wallTimeout:) + 24 (Dispatch.swift:189)
4   Authorization           	0x000000010a0072d8 TriggerRepeatOperation.main() + 188 (TriggerRepeat.swift:96)
5   Authorization           	0x000000010a007358 @objc TriggerRepeatOperation.main() + 28 (:0)
6   Foundation                    	0x00000001a09be6f0 __NSOPERATION_IS_INVOKING_MAIN__ + 16 (NSOperation.m:2189)
7   Foundation                    	0x00000001a097fd0c -[NSOperation start] + 708 (NSOperation.m:2206)
8   Foundation                    	0x00000001a097fa40 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 16 (NSOperation.m:2220)
9   Foundation                    	0x00000001a0985104 __NSOQSchedule_f + 172 (NSOperation.m:2231)
10  libdispatch.dylib             	0x00000001ad991114 _dispatch_block_async_invoke2 + 148 (queue.c:555)
11  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
12  libdispatch.dylib             	0x00000001ad98546c _dispatch_continuation_pop + 504 (inline_internal.h:2632)
13  libdispatch.dylib             	0x00000001ad984ad4 _dispatch_async_redirect_invoke + 584 (queue.c:830)
14  libdispatch.dylib             	0x00000001ad993a6c _dispatch_root_queue_drain + 396 (inline_internal.h:0)
15  libdispatch.dylib             	0x00000001ad994284 _dispatch_worker_thread2 + 164 (queue.c:7052)
16  libsystem_pthread.dylib       	0x00000001f2e24dbc _pthread_wqthread + 228 (pthread.c:2631)
17  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 11 name:
Thread 11:
0   libsystem_kernel.dylib        	0x00000001e2be8680 __ulock_wait + 8
1   libdispatch.dylib             	0x00000001ad9829cc _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib             	0x00000001ad982780 _dispatch_thread_event_wait_slow + 56 (lock.c:368)
3   libdispatch.dylib             	0x00000001ad991860 __DISPATCH_WAIT_FOR_QUEUE__ + 368 (lock.h:330)
4   libdispatch.dylib             	0x00000001ad99140c _dispatch_sync_f_slow + 144 (queue.c:1769)
5   libsystem_trace.dylib         	0x00000001bcfbcce0 ___os_state_request_for_self_block_invoke + 372 (state.c:199)
6   libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
7   libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
8   libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
9   libdispatch.dylib             	0x00000001ad98a214 _dispatch_lane_invoke + 436 (queue.c:3940)
10  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
11  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
12  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 12 name:
Thread 12:
0   libsystem_kernel.dylib        	0x00000001e2be7adc semaphore_timedwait_trap + 8
1   libdispatch.dylib             	0x00000001ad9825f4 _dispatch_sema4_timedwait + 64 (lock.c:154)
2   libdispatch.dylib             	0x00000001ad982bf4 _dispatch_semaphore_wait_slow + 76 (semaphore.c:116)
3   libswiftDispatch.dylib        	0x00000001aeb4495c OS_dispatch_semaphore.wait(wallTimeout:) + 24 (Dispatch.swift:189)
4   Authorization           	0x000000010a0072d8 TriggerRepeatOperation.main() + 188 (TriggerRepeat.swift:96)
5   Authorization           	0x000000010a007358 @objc TriggerRepeatOperation.main() + 28 (:0)
6   Foundation                    	0x00000001a09be6f0 __NSOPERATION_IS_INVOKING_MAIN__ + 16 (NSOperation.m:2189)
7   Foundation                    	0x00000001a097fd0c -[NSOperation start] + 708 (NSOperation.m:2206)
8   Foundation                    	0x00000001a097fa40 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 16 (NSOperation.m:2220)
9   Foundation                    	0x00000001a0985104 __NSOQSchedule_f + 172 (NSOperation.m:2231)
10  libdispatch.dylib             	0x00000001ad991114 _dispatch_block_async_invoke2 + 148 (queue.c:555)
11  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
12  libdispatch.dylib             	0x00000001ad98546c _dispatch_continuation_pop + 504 (inline_internal.h:2632)
13  libdispatch.dylib             	0x00000001ad984ad4 _dispatch_async_redirect_invoke + 584 (queue.c:830)
14  libdispatch.dylib             	0x00000001ad993a6c _dispatch_root_queue_drain + 396 (inline_internal.h:0)
15  libdispatch.dylib             	0x00000001ad994284 _dispatch_worker_thread2 + 164 (queue.c:7052)
16  libsystem_pthread.dylib       	0x00000001f2e24dbc _pthread_wqthread + 228 (pthread.c:2631)
17  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 13 name:
Thread 13:
0   libswiftCore.dylib            	0x00000001a07a8804 _findContextDescriptor(swift::Demangle::__runtime::Node*, swift::Demangle::__runtime::Demangler&) + 3548 (MetadataLookup.cpp:709)
1   libswiftCore.dylib            	0x00000001a07b5084 swift::Demangle::__runtime::TypeDecoder<(anonymous namespace)::DecodedMetadataBuilder>::decodeMangledTypeDecl(swift::Demangle::__runtime::Node*, unsigned int, swift::TargetContextDescriptor::decodeMangledType(swift::Demangle::__runtime::Node*, unsigned int, bool) + 18836 (TypeDecoder.h:530)
3   libswiftCore.dylib            	0x00000001a07ae140 swift_getTypeByMangledNodeImpl(swift::MetadataRequest, swift::Demangle::__runtime::Demangler&, swift::Demangle::__runtime::Node*, void const* const*, std::__1::function const* (unsigned int, unsi... + 1164 (MetadataLookup.cpp:1922)
6   libswiftCore.dylib            	0x00000001a07a9c58 swift_getTypeByMangledName + 832 (CompatibilityOverrideRuntime.def:157)
7   libswiftCore.dylib            	0x00000001a07aa2a4 swift_stdlib_getTypeByMangledNameUntrusted + 96 (MetadataLookup.cpp:2016)
8   libswiftCore.dylib            	0x00000001a07ab790 getObjCClassByMangledName(char const*, objc_class**) + 188 (MetadataLookup.cpp:2335)
9   libobjc.A.dylib               	0x000000019f8b9840 look_up_class + 388 (objc-runtime-new.mm:7877)
10  CoreData                      	0x00000001adc1ba7c +[NSManagedObject(_PFDynamicAccessorsAndPropertySupport) classForEntity:] + 516 (NSManagedObject_Accessors.m:429)
11  CoreData                      	0x00000001adc1b728 _PFFastEntityClass + 308 (NSEntityDescription.m:2357)
12  CoreData                      	0x00000001adbe0078 -[NSManagedObjectContext _retainedObjectWithID:optionalHandler:withInlineStorage:] + 120 (NSManagedObjectContext.m:5792)
13  CoreData                      	0x00000001adbe3970 _prepareResultsFromResultSet + 3596 (NSSQLPerformanceDefinitions.m:2146)
14  CoreData                      	0x00000001adba2ae0 newFetchedRowsForFetchPlan_MT + 1400 (NSSQLPerformanceDefinitions.m:2564)
15  CoreData                      	0x00000001adb9f880 _executeFetchRequest + 56 (NSSQLCore_Functions.m:5263)
16  CoreData                      	0x00000001adbbffd8 -[NSSQLFetchRequestContext executeRequestCore:] + 36 (NSSQLFetchRequestContext.m:533)
17  CoreData                      	0x00000001adbbfc64 -[NSSQLStoreRequestContext executeRequestUsingConnection:] + 252 (NSSQLStoreRequestContext.m:183)
18  CoreData                      	0x00000001adbbf8a8 __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 60 (NSSQLConnectionManager.m:301)
19  CoreData                      	0x00000001adc67348 __37-[NSSQLiteConnection performAndWait:]_block_invoke + 48 (NSSQLiteConnection.m:738)
20  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
21  libdispatch.dylib             	0x00000001ad991574 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1023)
22  CoreData                      	0x00000001adc671e8 -[NSSQLiteConnection performAndWait:] + 176 (NSSQLiteConnection.m:735)
23  CoreData                      	0x00000001adbaf2dc -[NSSQLDefaultConnectionManager handleStoreRequest:] + 248 (NSSQLConnectionManager.m:296)
24  CoreData                      	0x00000001adbaf1ac -[NSSQLCoreDispatchManager routeStoreRequest:] + 228 (NSSQLCoreDispatchManager.m:60)
25  CoreData                      	0x00000001adb9e4c0 -[NSSQLCore dispatchRequest:withRetries:] + 164 (NSSQLCore.m:3896)
26  CoreData                      	0x00000001adba9e00 -[NSSQLCore executeRequest:withContext:error:] + 3336 (NSSQLCore.m:2531)
27  CoreData                      	0x00000001add18b6c __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.551 + 4184 (NSPersistentStoreCoordinator.m:2981)
28  CoreData                      	0x00000001adbe45f4 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 264 (NSPersistentStoreCoordinator.m:612)
29  CoreData                      	0x00000001adba8a8c -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1080 (NSPersistentStoreCoordinator.m:2755)
30  CoreData                      	0x00000001adb9bd30 -[NSManagedObjectContext executeFetchRequest:error:] + 688 (NSManagedObjectContext.m:2258)
31  CoreData                      	0x00000001adb96e60 -[NSManagedObjectContext executeRequest:error:] + 316 (NSManagedObjectContext.m:1962)
32  CoreData                      	0x00000001adcaf1d0 NSManagedObjectContext.fetch</a><a>(_:) + 84 (NSManagedObjectContext.swift:19)
33  Authorization           	0x0000000109d9cd7c AuthMetricsCoreDataWorker.getSendStatus() + 392 (AuthMetricsCoreDataManager.swift:416)
34  Authorization           	0x0000000109d9afe4 closure #1 in AuthMetricsCoreDataManager.getStatus() + 468 (AuthMetricsCoreDataManager.swift:153)
35  Authorization           	0x0000000109d99054 partial apply for closure #1 in AuthMetricsCoreDataManager.getStatus() + 16 (:0)
36  Authorization           	0x0000000109d96890 specialized closure #1 in closure #1 in AuthMetricsCoreDataManager.runWorkerActions</a><a>(actions:) + 128
37  Authorization           	0x0000000109d99b5c partial apply for specialized closure #1 in closure #1 in AuthMetricsCoreDataManager.runWorkerActions</a><a>(actions:) + 40
38  Authorization           	0x0000000109f6d960 thunk for @callee_guaranteed () -> () + 20 (:0)
39  Authorization           	0x0000000109f6d980 thunk for @escaping @callee_guaranteed () -> () + 20 (:0)
40  CoreData                      	0x00000001adc05c20 developerSubmittedBlockToNSManagedObjectContextPerform + 156 (NSManagedObjectContext.m:3964)
41  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
42  libdispatch.dylib             	0x00000001ad991574 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1023)
43  CoreData                      	0x00000001adc057a8 -[NSManagedObjectContext performBlockAndWait:] + 264 (NSManagedObjectContext.m:4081)
44  Authorization           	0x0000000109d96500 specialized closure #1 in AuthMetricsCoreDataManager.runWorkerActions</a><a>(actions:) + 280 (AuthMetricsCoreDataManager.swift:174)
45  Authorization           	0x0000000109d66744 thunk for @escaping @callee_guaranteed () -> () + 28 (:0)
46  libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
47  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
48  libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
49  libdispatch.dylib             	0x00000001ad98a1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
50  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
51  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
52  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 14 name:
Thread 14:
0   libsystem_kernel.dylib        	0x00000001e2be8b48 __psynch_mutexwait + 8
1   libsystem_pthread.dylib       	0x00000001f2e26150 _pthread_mutex_firstfit_lock_wait + 84 (pthread_mutex.c:1414)
2   libsystem_pthread.dylib       	0x00000001f2e2d310 _pthread_mutex_firstfit_lock_slow + 248 (pthread_mutex.c:1490)
3   libc++.1.dylib                	0x00000001b48a89f0 std::__1::mutex::lock() + 16 (__threading_support:349)
4   Realm                         	0x000000010e46e0c4 lock_guard + 8 (__mutex_base:90)
5   Realm                         	0x000000010e46e0c4 lock_guard + 8 (__mutex_base:90)
6   Realm                         	0x000000010e46e0c4 +[RLMRealm realmWithConfiguration:queue:error:] + 884 (RLMRealm.mm:512)
7   RealmSwift                    	0x000000010eab62f0 init + 40 (:0)
8   RealmSwift                    	0x000000010eab62f0 init + 40 (:0)
9   RealmSwift                    	0x000000010eab62f0 Realm.init(configuration:queue:) + 92 (Realm.swift:95)
10  ReliableTransmission          	0x000000010eb86404 closure #1 in closure #1 in DefaultItemStore.insert(item:completionHandler:) + 276 (DefaultItemStore.swift:75)
11  ReliableTransmission          	0x000000010eb8c304 partial apply for thunk for @callee_guaranteed () -> (@error @owned Error) + 20 (:0)
12  ReliableTransmission          	0x000000010eb8cf5c thunk for @callee_guaranteed () -> (@error @owned Error)partial apply + 12
13  libswiftObjectiveC.dylib      	0x00000001ccd1c308 autoreleasepool</a><a>(invoking:) + 64 (ObjectiveC.swift:184)
14  ReliableTransmission          	0x000000010eb8cc4c partial apply for closure #1 in DefaultItemStore.insert(item:completionHandler:) + 80 (DefaultItemStore.swift:130)
15  ReliableTransmission          	0x000000010eb90428 thunk for @escaping @callee_guaranteed () -> () + 28 (:0)
16  libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
17  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
18  libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
19  libdispatch.dylib             	0x00000001ad98a1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
20  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
21  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
22  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

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

Thread 16 name:
Thread 16:
0   libsystem_kernel.dylib        	0x00000001e2be9480 kevent + 8
1   Realm                         	0x000000010e70fdd8 realm::_impl::ExternalCommitHelper::listen() + 156
2   Realm                         	0x000000010e70ff28 void* std::__1::__thread_proxy >, realm::_impl::ExternalCommitHelper::ExternalCom... + 52
3   libsystem_pthread.dylib       	0x00000001f2e256cc _pthread_start + 148 (pthread.c:893)
4   libsystem_pthread.dylib       	0x00000001f2e24ba4 thread_start + 8

Thread 17:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 18:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 19:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 20:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 21:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 22 name:
Thread 22:
0   RedactedAppName                    	0x0000000105d7e330 -[APMDatabase queryMeasurementConfigWithError:] + 0
1   RedactedAppName                    	0x0000000105df9a1c -[APMRemoteConfig measurementConfigFromDatabase] + 168
2   RedactedAppName                    	0x0000000105df6edc -[APMRemoteConfig initWithAppID:database:measurementConfig:experimentManager:] + 768
3   RedactedAppName                    	0x0000000105df6b0c -[APMRemoteConfig initWithAppID:database:experimentManager:] + 124
4   RedactedAppName                    	0x0000000105da5000 __47-[APMMeasurement startMeasurementOnWorkerQueue]_block_invoke + 1596
5   RedactedAppName                    	0x0000000105da48ac -[APMMeasurement startMeasurementOnWorkerQueue] + 208
6   RedactedAppName                    	0x0000000105da4090 -[APMMeasurement setEnabledOnWorkerQueue:] + 272
7   RedactedAppName                    	0x0000000105da3f70 __29-[APMMeasurement setEnabled:]_block_invoke + 44
8   RedactedAppName                    	0x0000000105dfa818 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 44
9   libdispatch.dylib             	0x00000001ad9804b4 _dispatch_call_block_and_release + 32 (init.c:1518)
10  libdispatch.dylib             	0x00000001ad981fdc _dispatch_client_callout + 20 (object.m:560)
11  libdispatch.dylib             	0x00000001ad989694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
12  libdispatch.dylib             	0x00000001ad98a1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
13  libdispatch.dylib             	0x00000001ad994e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
14  libsystem_pthread.dylib       	0x00000001f2e24df8 _pthread_wqthread + 288 (pthread.c:2618)
15  libsystem_pthread.dylib       	0x00000001f2e24b98 start_wqthread + 8

Thread 23 name:
Thread 23:
0   libsystem_kernel.dylib        	0x00000001e2be7b48 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	0x00000001e2bfa008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib        	0x00000001e2bfa248 mach_msg_overwrite + 388 (mach_msg.c:0)
3   libsystem_kernel.dylib        	0x00000001e2be808c mach_msg + 24 (mach_msg.c:323)
4   RedactedAppName                    	0x000000010480f778 FIRCLSMachExceptionReadMessage + 60 (FIRCLSMachException.c:192)
5   RedactedAppName                    	0x000000010480f778 FIRCLSMachExceptionServer + 108 (FIRCLSMachException.c:168)
6   libsystem_pthread.dylib       	0x00000001f2e256cc _pthread_start + 148 (pthread.c:893)
7   libsystem_pthread.dylib       	0x00000001f2e24ba4 thread_start + 8

Thread 24:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 25:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 26:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0

Thread 27:
0   libsystem_pthread.dylib       	0x00000001f2e24b90 start_wqthread + 0


Thread 2 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x0000000000989680   x6: 0x000000000000006e   x7: 0xffffffff00000a00
    x8: 0x8237d1b281239b64   x9: 0x8237d1b3eaf46b64  x10: 0x00000000000003e8  x11: 0x000000000000000b
   x12: 0x000000000000000b  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x000000016bd7f000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000001803  x21: 0x000000016bd7f0e0  x22: 0x0000000000000007  x23: 0x000000010645747a
   x24: 0x0000000000000000  x25: 0x000000016bd7f0e0  x26: 0x000000016bd7cbf0  x27: 0x0000000281a30168
   x28: 0x000000011880ca00   fp: 0x000000016bd7c510   lr: 0x00000001f2e2b1ac
    sp: 0x000000016bd7c4f0   pc: 0x00000001e2bee200 cpsr: 0x40001000
   esr: 0x56000080  Address size fault


Binary Images:
0x104194000 - 0x106943fff RedactedAppName arm64  <35350e9227873987abb2299600cb78fb> /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/RedactedAppName
0x107378000 - 0x10741bfff PerformanceUtil arm64   /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/PerformanceUtil.framework/PerformanceUtil
0x109d4c000 - 0x10a203fff Authorization arm64  <07ad3e7c532d362f8105d80474d1eb57> /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/Authorization.framework/Authorization
0x10ca78000 - 0x10ca8bfff Experimentation arm64  <5c3367ee2168342eb8eea153a32de912> /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/QBExperimentation.framework/QBExperimentation
0x10e344000 - 0x10e8effff Realm arm64  <24191ac488b536ef81fd10b88115aad5> /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/Realm.framework/Realm
0x10ea48000 - 0x10eb17fff RealmSwift arm64   /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/RealmSwift.framework/RealmSwift
0x10eb78000 - 0x10eb9ffff ReliableTransmission arm64  <4dd10f6e0cee3695b18a89a6aa14e986> /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/ReliableTransmission.framework/ReliableTransmission
0x10fc40000 - 0x10fcaffff KochavaCore arm64   /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/KochavaCore.framework/KochavaCore
0x10fce0000 - 0x10fd67fff KochavaTracker arm64  <1eba2030ae2e38749f8d6633c121bbe0> /private/var/containers/Bundle/Application/E250C8AA-1318-431A-B049-762E8783E0C5/RedactedAppName.app/Frameworks/KochavaTracker.framework/KochavaTracker
0x19f8b4000 - 0x19f8f7c3f libobjc.A.dylib arm64e   /usr/lib/libobjc.A.dylib
0x1a03a9000 - 0x1a0911fff libswiftCore.dylib arm64e   /usr/lib/swift/libswiftCore.dylib
0x1a0944000 - 0x1a128efff Foundation arm64e   /System/Library/Frameworks/Foundation.framework/Foundation
0x1a64fc000 - 0x1a68e0fff CoreFoundation arm64e  <42c5c91704473995b50fde4d132c2435> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1a7677000 - 0x1a7a3cfff CFNetwork arm64e  <35605de33723335a83d96f35f2989935> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x1a7a3d000 - 0x1a7b60fff CoreTelephony arm64e   /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x1a868a000 - 0x1a9e50fff UIKitCore arm64e  <7b942fa4cb7633759972f58c14492fb4> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x1ad97e000 - 0x1ad9c4fff libdispatch.dylib arm64e   /usr/lib/system/libdispatch.dylib
0x1ad9c5000 - 0x1ada44fff libsystem_c.dylib arm64e  <82c0f938e2773165a61470151c651798> /usr/lib/system/libsystem_c.dylib
0x1adb83000 - 0x1adedbfff CoreData arm64e  <838a1520e6353cba8e1600042c97e8cb> /System/Library/Frameworks/CoreData.framework/CoreData
0x1aeb43000 - 0x1aeb5aff7 libswiftDispatch.dylib arm64e   /usr/lib/swift/libswiftDispatch.dylib
0x1b489a000 - 0x1b4900ff3 libc++.1.dylib arm64e  <36bf5e0c2d4036faa0752476613f6d3f> /usr/lib/libc++.1.dylib
0x1bbe6f000 - 0x1bbf14fff FrontBoardServices arm64e  <8e15b35ea6143142b34d2c3cbbc13a8b> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
0x1bcfb3000 - 0x1bcfccfff libsystem_trace.dylib arm64e  <0de65dd9be413e129257c4f0adc0d5bb> /usr/lib/system/libsystem_trace.dylib
0x1c488c000 - 0x1c490ee4f dyld arm64e  <341bbf646034357e8aa6e1e4b988e03c> /usr/lib/dyld
0x1ccd1b000 - 0x1ccd1eff1 libswiftObjectiveC.dylib arm64e  <79ddd58730cd3302817443d81f5b998e> /usr/lib/swift/libswiftObjectiveC.dylib
0x1df39c000 - 0x1df3a4fff GraphicsServices arm64e  <03732ba5113235b4b09d8dd49807d246> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1e2be7000 - 0x1e2c1dffb libsystem_kernel.dylib arm64e   /usr/lib/system/libsystem_kernel.dylib
0x1f2d5c000 - 0x1f2d73ffb libc++abi.dylib arm64e   /usr/lib/libc++abi.dylib
0x1f2d90000 - 0x1f2d96ff3 libsystem_platform.dylib arm64e   /usr/lib/system/libsystem_platform.dylib
0x1f2e24000 - 0x1f2e2ffff libsystem_pthread.dylib arm64e   /usr/lib/system/libsystem_pthread.dylib
0x1f2e68000 - 0x1f2ea7fff libxpc.dylib arm64e   /usr/lib/system/libxpc.dylib
0x216b4b000 - 0x216b61fff MetricKit arm64e   /System/Library/Frameworks/MetricKit.framework/MetricKit

EOF
</a>

The immediate cause of this crash is pretty easy to understand. Consider this backtrace:

0 CoreFoundation … __exceptionPreprocess + 164
1 libobjc.A.dylib … objc_exception_throw + 60
2 CoreFoundation … __NSFastEnumerationMutationHandler + 116
3 Foundation … -[NSConcreteHashTable countByEnumeratingWithState:objects:count:] + 76
4 MetricKit … -[MXMetricManager deliverMetricPayload:] + 408
5 Foundation … __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 16

Frame 5 is XPC delivering a message to MetricKit. That message contains MXMetricPayload values. MetricKit is in the process of iterating through its array of subscribers, passing that array to the -didReceiveMetricPayloads: method of each subscribers.

Frame 3 through 0 are characteristic of the was mutated while being enumerated exception discussed above. It’s likely that the collection in this case is MetricKit’s set of subscribers. So, you get this crash because you have either added or removed a subscriber while MetricKit is in the process of delivering metrics to its list of subscribers.

I’m not a deeply familiar with the MetricKit source code but this sounds like a bug to me. AFAICT MetricKit has appropriate serialisation for the APIs to add and remove subscribers, but not for its own internal use of the subscriber list.

I encourage you to file a bug about this, make sure to include a crash report. If you are able to reproduce this in your office, take a sysdiagnose log immediately after the crash and add that as well.

Please post your bug number, just for the record.

As to a workaround, how many subscribers does your app register? That is, if you set a symbolic breakpoint on -[MXMetricManager addSubscriber:], how many times is it called on launch?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I confirmed that [MXMetricManager addSubscriber] is called twice - it's invoked from another internal swift framework. Should there be only one subscriber? We had to remove a subscriber and release a version to stop the influx of crashes.

I submitted a bug using Feedback Assistant: https://feedbackassistant.apple.com/feedback/11525011

I see that it says "Potential fix identified - For a future OS update"

I confirmed that [MXMetricManager addSubscriber] is called twice - it's invoked from another internal swift framework.

Cool.

Should there be only one subscriber?

No. This is definitely our bug to fix.

We had to remove a subscriber and release a version to stop the influx of crashes.

That’s the correct workaround until we fix the bug.

I submitted a bug using Feedback Assistant [FB11525011]

Thanks!

My reading of that bug is that the fix is included in the current iOS 16.1b3 (20B5056e) seed. If you can find a way to reproduce this on 16.0, you could try testing with the beta seed to see if it still reproduces for you there.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Same problem, is there further analysis?

Accepted Answer

The above indicates:

  • It’s a bug.

  • It’s reported as fixed in iOS 16.1 beta.

  • The workaround is to limit your app to a single subscriber.

What “further analysis” are you looking for?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I finally find my way to solve this problem, first share my analysis of this problem: when deliver Metric payloads to all subscribers we called -[MXMetricManager addSubscriber:], this cause the NSConcreteHashTable that save subscribers get mutated while being enumerated. It seems that the NSConcreteHashTable add subscribers or deliver Metric payloads in it's own thread, so just dispatch to main queue to call -[MXMetricManager addSubscriber:] not work. This is easy to reproduce, just keep add new subscriber(not equal to existed subscriber) in you code and simulate metric payload with Xcode. Finally I try to hook -[MXMetricManager addSubscriber:] and -[MXMetricManager removeSubscriber:] to a custom Class, this class hold a NSPointerArray of all subscribers, and dispatch to each subscribers when -didReceiveMetricPayloads: and -didReceiveDiagnosticPayloads: getting called.

iOS16 [MXMetricManager deliverMetricPayload:] Crash
 
 
Q