Termination due to Exceed Port Limit

Hi,

I have received the following report after app termination. I have researched online but cannot determine the root cause. Any tips or ideas would help please.

Could it be Location Services, UserNotification Services, or Network Requests?

Thank you, Brendan


Translated Report (Full Report Below)

Incident Identifier: 6CD59A17-15B1-4F4E-AE84-0286F22893A4 CrashReporter Key: 3d12FB7359053239708afd24c7eed0267a9cc601 Hardware Model: iPhone13,3 Process: AnchorNet3 [5605] Path: /private/var/containers/Bundle/Application/5EA7F893-D562-45B8-8995-5EAB15F85A7E/AnchorNet3.app/AnchorNet3 Identifier: com.sailsecrets.AnchorNet3 Version: 3.17 (3.17) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.sailsecrets.AnchorNet3 [1443]

Date/Time: 2025-02-06 00:12:03.6136 +0100 Launch Time: 2025-02-05 22:11:19.4220 +0100 OS Version: iPhone OS 18.2 (22C5131e) Release Type: Beta Baseband Version: 5.20.03 Report Version: 104

Exception Type: EXC_RESOURCE (SIGKILL) Exception Codes: 0x0000000000020000, 0x0000000000000000 Termination Reason: PORT_SPACE 14123288431434006528 (Limit 131072 ports) Exceeded system-wide per-process Port Limit

Triggered by Thread: 3

Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0 libsystem_kernel.dylib 0x1e27414e4 kevent_id + 8 1 libdispatch.dylib 0x198f51b40 _dispatch_kq_poll + 228 2 libdispatch.dylib 0x198f51080 _dispatch_event_loop_poke + 340 3 QuartzCore 0x192d4631c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 17164 4 QuartzCore 0x192cb8d58 CA::Transaction::commit() + 648 5 QuartzCore 0x192cb8764 CA::Transaction::flush_as_runloop_observer(bool) + 88 6 UIKitCore 0x193a3fd14 _UIApplicationFlushCATransaction + 52 7 UIKitCore 0x193a3d1e0 __setupUpdateSequence_block_invoke_2 + 332 8 UIKitCore 0x193a3d054 UIUpdateSequenceRun + 84 9 UIKitCore 0x193a3f984 schedulerStepScheduledMainSection + 172 10 UIKitCore 0x193a3d5a0 runloopSourceCallback + 92 11 CoreFoundation 0x1911f1f3c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 12 CoreFoundation 0x1911f1ed0 __CFRunLoopDoSource0 + 176 13 CoreFoundation 0x1911f4b30 __CFRunLoopDoSources0 + 244 14 CoreFoundation 0x1911f3d2c __CFRunLoopRun + 840 15 CoreFoundation 0x191246274 CFRunLoopRunSpecific + 588 16 GraphicsServices 0x1de34d4c0 GSEventRunModal + 164 17 UIKitCore 0x193d8f480 -[UIApplication run] + 816 18 UIKitCore 0x1939b5410 UIApplicationMain + 340 19 SwiftUI 0x195b43e30 closure #1 in KitRendererCommon(:) + 168 20 SwiftUI 0x195b43d60 runApp<A>(:) + 100 21 SwiftUI 0x195b43c44 static App.main() + 180 22 AnchorNet3.debug.dylib 0x1025e97bc static MainApp.$main() + 40 23 AnchorNet3.debug.dylib 0x1025eaacc __debug_main_executable_dylib_entry_point + 12 24 dyld 0x1b7352de8 start + 2724

Thread 1 name: com.apple.CoreMotion.MotionThread Thread 1: 0 libsystem_kernel.dylib 0x1e2741788 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x1e2744e98 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x1e2744db0 mach_msg_overwrite + 424 3 libsystem_kernel.dylib 0x1e2744bfc mach_msg + 24 4 CoreFoundation 0x1911f47f4 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x1911f3ea0 __CFRunLoopRun + 1212 6 CoreFoundation 0x191246274 CFRunLoopRunSpecific + 588 7 CoreFoundation 0x191259814 CFRunLoopRun + 64 8 CoreMotion 0x19e89cc5c 0x19e88d000 + 64604 9 libsystem_pthread.dylib 0x21bcfb7d0 _pthread_start + 136 10 libsystem_pthread.dylib 0x21bcfb480 thread_start + 8

Thread 2 name: com.apple.uikit.eventfetch-thread Thread 2: 0 libsystem_kernel.dylib 0x1e2741788 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x1e2744e98 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x1e2744db0 mach_msg_overwrite + 424 3 libsystem_kernel.dylib 0x1e2744bfc mach_msg + 24 4 CoreFoundation 0x1911f47f4 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x1911f3ea0 __CFRunLoopRun + 1212 6 CoreFoundation 0x191246274 CFRunLoopRunSpecific + 588 7 Foundation 0x18fdc8338 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 8 Foundation 0x18ff24e24 -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 9 UIKitCore 0x193e22a74 -[UIEventFetcher threadMain] + 420 10 Foundation 0x18feb4194 NSThread__start + 724 11 libsystem_pthread.dylib 0x21bcfb7d0 _pthread_start + 136 12 libsystem_pthread.dylib 0x21bcfb480 thread_start + 8

Thread 3 name: com.apple.SwiftUI.AsyncRenderer Thread 3 Crashed: 0 libsystem_kernel.dylib 0x1e274162c _kernelrpc_mach_port_allocate_trap + 8 1 libsystem_kernel.dylib 0x1e2748478 mach_port_allocate + 36 2 QuartzCore 0x192d4552c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 13596 3 QuartzCore 0x192cb8d58 CA::Transaction::commit() + 648 4 QuartzCore 0x192cb8764 CA::Transaction::flush_as_runloop_observer(bool) + 88 5 CoreFoundation 0x19119f894 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 36 6 CoreFoundation 0x19119f3e8 __CFRunLoopDoObservers + 552 7 CoreFoundation 0x1912462c0 CFRunLoopRunSpecific + 664 8 Foundation 0x18fdc8338 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 9 Foundation 0x18fdc4500 -[NSRunLoop(NSRunLoop) run] + 64 10 SwiftUI 0x195c276d8 specialized static DisplayLink.asyncThread(arg:) + 792 11 SwiftUI 0x195c273a8 @objc static DisplayLink.asyncThread(arg:) + 72

<<POST SIZE LIMIT>>

Answered by DTS Engineer in 825298022

First, lemme define two terms, albeit vaguely:

  • A light object is something that you can create and destroy willy-nilly.

  • A heavy object owns a resource and thus it makes sense to create one instance and share it (or maybe a small number of instances).

It’s hard to know from the outside whether a particular object is heavy or ‘light’. Sometimes that information is covered in the documentation — a good example of this is URLSession, where we go out of our way to document that it’s heavy — but in other cases you just have to infer it from the examples in the docs, the published sample code, and so on.

This thread suggests that CMAltimeter is heavier than it looks, and thus it makes sense to maintain a small number of instances.


However, there’s something else going on here. Even with a heavy object, creating and destroying the object a bunch of times shouldn’t leak Mach ports. The object should clean up after itself. However, I played around this myself and encountered something weird. Consider this code:

func test() {
    let before = machPortCount()
    autoreleasepool {
        for _ in 0..<100 {
            _ = CMAltimeter()
        }
    }
    let after = machPortCount()
    print(before, after)
}

where machPortCount() is a function I wrote that returns the number of Mach ports allocated by this process [1]. I then wired it up to a button and ran the app on a device (iOS 18.3.1). Every time I tapped the button, the count goes up by about 200!

122 331
335 548
550 748
750 949
912 1123

That’s problematic to say the least.

So, given the above, my advice is:

  • File a bug against CMAltimeter. Allocating and deallocating the object shouldn’t leak Mach ports [2]. When you’re done, please post the bug number here so that I can add my analysis to it.

  • The workaround is to reduce the number of CMAltimeter objects you allocate to the bare minimum.

Share and Enjoy

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

[1] Technically, it’s the number of port names in this task’s namespace. I implemented this function using Mach APIs. I’m not gonna share the code because it’s too large, but if you want a taste of how this works you can check out the (ancient) MachPortDump sample code.

[2] I think it’s actually leaking objects, and those objects own the Mach ports, but that’s a distinction that doesn’t make a difference. You’re gonna run out of Mach ports way earlier than you run out of memory.

Full content of Thread 3:

Thread 3 name: com.apple.SwiftUI.AsyncRenderer Thread 3 Crashed: 0 libsystem_kernel.dylib 0x1e274162c _kernelrpc_mach_port_allocate_trap + 8 1 libsystem_kernel.dylib 0x1e2748478 mach_port_allocate + 36 2 QuartzCore 0x192d4552c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 13596 3 QuartzCore 0x192cb8d58 CA::Transaction::commit() + 648 4 QuartzCore 0x192cb8764 CA::Transaction::flush_as_runloop_observer(bool) + 88 5 CoreFoundation 0x19119f894 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 36 6 CoreFoundation 0x19119f3e8 __CFRunLoopDoObservers + 552 7 CoreFoundation 0x1912462c0 CFRunLoopRunSpecific + 664 8 Foundation 0x18fdc8338 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 9 Foundation 0x18fdc4500 -[NSRunLoop(NSRunLoop) run] + 64 10 SwiftUI 0x195c276d8 specialized static DisplayLink.asyncThread(arg:) + 792 11 SwiftUI 0x195c273a8 @objc static DisplayLink.asyncThread(arg:) + 72 12 Foundation 0x18feb4194 NSThread__start + 724 13 libsystem_pthread.dylib 0x21bcfb7d0 _pthread_start + 136 14 libsystem_pthread.dylib 0x21bcfb480 thread_start + 8

Sadly, your crash report is quite mangled. Please repost it as an attachment. 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"

Hi,

Thank you for replying. I managed to import the ops file into the device & sim and I think it's converted it into symbolic format. The three most recent crashes all point to the CMAltimeter thread. I will comment out all reference to CMAltimeter and see if the App functions without crash. Reading the link you sent "Crash reports have two common extensions: .crash and .ips. If you have an .ips file, please post that [1]." I have ips and renamed it .json so I could upload it.

{"app_name":"AnchorNet3","timestamp":"2025-02-06 21:17:27.00 +0100","app_version":"3.17","slice_uuid":"19235f86-b5e4-382b-a45c-43cf8423b03c","build_version":"3.17","platform":2,"bundleID":"com.sailsecrets.AnchorNet3","share_with_app_devs":1,"is_first_party":0,"bug_type":"385","os_version":"iPhone OS 18.2 (22C5131e)","roots_installed":0,"name":"AnchorNet3","incident_id":"AB269012-CE64-4580-A36D-53AD9CB70800"}
{
  "uptime" : 400000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "iPhone13,3",
  "coalitionID" : 1443,
  "osVersion" : {
    "isEmbedded" : true,
    "train" : "iPhone OS 18.2",
    "releaseType" : "Beta",
    "build" : "22C5131e"
  },
  "captureTime" : "2025-02-06 21:17:27.1672 +0100",
  "codeSigningMonitor" : 1,
  "incident" : "AB269012-CE64-4580-A36D-53AD9CB70800",
  "pid" : 6095,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "385",
  "procLaunch" : "2025-02-06 18:53:06.7076 +0100",
  "procStartAbsTime" : 9422654529639,
  "procExitAbsTime" : 9630502438599,
  "procName" : "AnchorNet3",
  "procPath" : "\/private\/var\/containers\/Bundle\/Application\/47F8F0FC-1792-40D6-B5FF-C168C6BF383F\/AnchorNet3.app\/AnchorNet3",
  "bundleInfo" : {"CFBundleShortVersionString":"3.17","CFBundleVersion":"3.17","CFBundleIdentifier":"com.sailsecrets.AnchorNet3"},
  "storeInfo" : {"deviceIdentifierForVendor":"FABC2434-8BCC-4008-9061-40077F4A1D68","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.sailsecrets.AnchorNet3",
  "crashReporterKey" : "3d12fb7359053239708afd24c7eed0267a9cc601",
  "lowPowerMode" : 1,
  "wasUnlockedSinceBoot" : 1,
  "isLocked" : 0,
  "codeSigningID" : "com.sailsecrets.AnchorNet3",
  "codeSigningTeamID" : "E9N4742G2M",
  "codeSigningFlags" : 570434309,
  "codeSigningValidationCategory" : 3,
  "codeSigningTrustLevel" : 6,
  "instructionByteStream" : {"beforePC":"ARAA1MADX9aQBYCSARAA1MADX9awBYCSARAA1MADX9bQBYCSARAA1A==","atPC":"wANf1vAFgJIBEADUwANf1hAGgJIBEADUwANf1jAGgJIBEADUwANf1g=="},
  "bootSessionUUID" : "F83BF023-6195-4753-A957-662D3E9E4F49",
  "basebandVersion" : "5.20.03",
  "exception" : {"codes":"0x0000000000020000, 0x0000000000000000","rawCodes":[131072,0],"type":"EXC_RESOURCE","signal":"SIGKILL"},
  "termination" : {"flags":2,"code":14123288431434006528,"namespace":"PORT_SPACE","indicator":"(Limit 131072 ports) Exceeded system-wide per-process Port Limit"},
  "faultingThread" : 7,
  "threads" : [
      {"id":3345475,"threadState":
          {"x":
              [
                  {"value":12933847280},
                  {"value":12891159576},
                  {"value":8481749848,"symbolLocation":0,"symbol":"type metadata for ObservableObjectPublisher"},
                  {"value":12891159576},
                  {"value":0},
                  {"value":8480017448,"symbolLocation":52040,"symbol":"InitialAllocationPool"},
                  {"value":5604250624},
                  {"value":10692404504,"symbolLocation":0,"symbol":"type metadata for EnvironmentValues"},
                  {"value":12933847288},
                  {"value":8589934592},
                  {"value":13835058056897066288},
                  {"value":13835058065487000880},
                  {"value":0},
                  {"value":4357026260223010},
                  {"value":668265261},
                  {"value":1},
                  {"value":8505182768,"symbolLocation":0,"symbol":"value witness table for Builtin.NativeObject"},
                  {"value":16409428200783006272},
                  {"value":0},
                  {"value":6127459776},
                  {"value":12933847280},
                  {"value":8},
                  {"value":6127459776},
                  {"value":64},
                  {"value":0},
                  {"value":8479988992,"symbolLocation":23584,"symbol":"InitialAllocationPool"},
                  {"value":4351359664,"symbolLocation":0,"symbol":"type metadata for AppData"},
                  {"value":5604250624},{"value":5604250624}
              ]
              ,"flavor":"ARM_THREAD_STATE64","lr":{"value":6706051140},"cpsr":{"value":2147487744},"fp":{"value":6127459680},"sp":{"value":6127459664},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6706029440},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":4019072,"symbol":"swift_retain","symbolLocation":104,"imageIndex":7},{"imageOffset":4040772,"symbol":"swift::metadataimpl::ValueWitnesses::initializeWithCopy(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata const*)","symbolLocation":32,"imageIndex":7},
                      {"imageOffset":1586936,"symbol":"initializeWithCopy for SubscriptionLifetime.StateType","symbolLocation":296,"imageIndex":8},
                      {"imageOffset":1586544,"symbol":"SubscriptionLifetime.isUninitialized.getter","symbolLocation":264,"imageIndex":8},{"imageOffset":1581524,"symbol":"StoreBox.update(property:phase:)","symbolLocation":612,"imageIndex":8},
                      {"imageOffset":116500,"symbol":"static BoxVTable.update(elt:property:phase:)","symbolLocation":420,"imageIndex":8},{"imageOffset":115988,"symbol":"_DynamicPropertyBuffer.update(container:phase:)","symbolLocation":144,"imageIndex":8},
                      {"imageOffset":87664,"symbol":"closure #1 in closure #1 in DynamicBody.updateValue()","symbolLocation":304,"imageIndex":8},{"imageOffset":87352,"symbol":"partial apply for closure #1 in closure #1 in DynamicBody.updateValue()","symbolLocation":32,"imageIndex":8},{"imageOffset":75976,"symbol":"withUnsafeMutablePointer(to:_:)","symbolLocation":160,"imageIndex":8},{"imageOffset":412828,"symbol":"closure #1 in DynamicBody.updateValue()","symbolLocation":424,"imageIndex":8},{"imageOffset":409608,"symbol":"DynamicBody.updateValue()","symbolLocation":928,"imageIndex":8},{"imageOffset":408664,"symbol":"partial apply for implicit closure #1 in closure #1 in closure #1 in Attribute.init<a>(_:)","symbolLocation":32,"imageIndex":8},{"imageOffset":52396,"symbol":"AG::Graph::UpdateStack::update()","symbolLocation":540,"imageIndex":9},{"imageOffset":51312,"symbol":"AG::Graph::update_attribute(AG::data::ptr, unsigned int)","symbolLocation":424,"imageIndex":9},{"imageOffset":50244,"symbol":"AG::Subgraph::update(unsigned int)","symbolLocation":848,"imageIndex":9},{"imageOffset":525420,"symbol":"ViewGraph.updateOutputs(async:)","symbolLocation":348,"imageIndex":8},{"imageOffset":522908,"symbol":"closure #2 in closure #1 in ViewRendererHost.render(interval:updateDisplayList:targetTimestamp:)","symbolLocation":152,"imageIndex":8},{"imageOffset":521592,"symbol":"closure #1 in ViewRendererHost.render(interval:updateDisplayList:targetTimestamp:)","symbolLocation":708,"imageIndex":8},{"imageOffset":520812,"symbol":"ViewRendererHost.render(interval:updateDisplayList:targetTimestamp:)","symbolLocation":556,"imageIndex":8},{"imageOffset":30320,"symbol":"UIHostingViewBase.layoutSubviews()","symbolLocation":324,"imageIndex":10},{"imageOffset":29972,"symbol":"_UIHostingView.layoutSubviews()","symbolLocation":120,"imageIndex":10},{"imageOffset":29816,"symbol":"@objc _UIHostingView.layoutSubviews()","symbolLocation":36,"imageIndex":10},{"imageOffset":228976,"symbol":"-[UIView(CALayerDelegate) layoutSublayersOfLayer:]","symbolLocation":2424,"imageIndex":11},{"imageOffset":590904,"symbol":"CA::Layer::layout_if_needed(CA::Transaction*)","symbolLocation":496,"imageIndex":12},{"imageOffset":589764,"symbol":"CA::Layer::layout_and_display_if_needed(CA::Transaction*)","symbolLocation":148,"imageIndex":12},{"imageOffset":938472,"symbol":"CA::Context::commit_transaction(CA::Transaction*, double, double*)","symbolLocation":472,"imageIndex":12},{"imageOffset":376152,"symbol":"CA::Transaction::commit()","symbolLocation":648,"imageIndex":12},{"imageOffset":374628,"symbol":"CA::Transaction::flush_as_runloop_observer(bool)","symbolLocation":88,"imageIndex":12},{"imageOffset":654612,"symbol":"_UIApplicationFlushCATransaction","symbolLocation":52,"imageIndex":11},{"imageOffset":643552,"symbol":"__setupUpdateSequence_block_invoke_2","symbolLocation":332,"imageIndex":11},{"imageOffset":643156,"symbol":"_UIUpdateSequenceRun","symbolLocation":84,"imageIndex":11},{"imageOffset":653700,"symbol":"schedulerStepScheduledMainSection","symbolLocation":172,"imageIndex":11},{"imageOffset":644512,"symbol":"runloopSourceCallback","symbolLocation":92,"imageIndex":11},{"imageOffset":474940,"symbol":"__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__","symbolLocation":28,"imageIndex":13},{"imageOffset":474832,"symbol":"__CFRunLoopDoSource0","symbolLocation":176,"imageIndex":13},{"imageOffset":486192,"symbol":"__CFRunLoopDoSources0","symbolLocation":244,"imageIndex":13},{"imageOffset":482604,"symbol":"__CFRunLoopRun","symbolLocation":840,"imageIndex":13},{"imageOffset":819828,"symbol":"CFRunLoopRunSpecific","symbolLocation":588,"imageIndex":13},{"imageOffset":5312,"symbol":"GSEventRunModal","symbolLocation":164,"imageIndex":14},{"imageOffset":4125824,"symbol":"-[UIApplication _run]","symbolLocation":816,"imageIndex":11},{"imageOffset":87056,"symbol":"UIApplicationMain","symbolLocation":340,"imageIndex":11},{"imageOffset":2694704,"symbol":"closure #1 in KitRendererCommon(_:)","symbolLocation":168,"imageIndex":10},{"imageOffset":2694496,"symbol":"runApp</a><a>(_:)","symbolLocation":100,"imageIndex":10},{"imageOffset":2694212,"symbol":"static App.main()","symbolLocation":180,"imageIndex":10},{"imageOffset":1992632,"symbol":"static MainApp.$main()","symbolLocation":40,"imageIndex":1},{"imageOffset":1997512,"symbol":"__debug_main_executable_dylib_entry_point","symbolLocation":12,"imageIndex":1},{"imageOffset":196072,"symbol":"start","symbolLocation":2724,"imageIndex":15}]},{"id":3345486,"name":"com.apple.CoreMotion.MotionThread","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":36296768618496},{"value":0},{"value":36296768618496},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":2},{"value":0},{"value":0},{"value":0},{"value":8451},{"value":211200},{"value":0},{"value":18446744073709551569},{"value":6861336080,"symbolLocation":56,"symbol":"clock_gettime"},{"value":0},{"value":4294967295},{"value":2},{"value":36296768618496},{"value":0},{"value":36296768618496},{"value":6128605464},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8094240408},"cpsr":{"value":4096},"fp":{"value":6128605312},"sp":{"value":6128605232},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":8094226312},"far":{"value":0}},"frames":[{"imageOffset":6024,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":17},{"imageOffset":20120,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":17},{"imageOffset":19888,"symbol":"mach_msg_overwrite","symbolLocation":424,"imageIndex":17},{"imageOffset":19452,"symbol":"mach_msg","symbolLocation":24,"imageIndex":17},{"imageOffset":485364,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":13},{"imageOffset":482976,"symbol":"__CFRunLoopRun","symbolLocation":1212,"imageIndex":13},{"imageOffset":819828,"symbol":"CFRunLoopRunSpecific","symbolLocation":588,"imageIndex":13},{"imageOffset":899092,"symbol":"CFRunLoopRun","symbolLocation":64,"imageIndex":13},{"imageOffset":64604,"imageIndex":18},{"imageOffset":6096,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":19},{"imageOffset":5248,"symbol":"thread_start","symbolLocation":8,"imageIndex":19}]},{"id":3345495,"name":"com.apple.uikit.eventfetch-thread","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":71481140707328},{"value":0},{"value":71481140707328},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":2},{"value":0},{"value":0},{"value":0},{"value":16643},{"value":0},{"value":0},{"value":18446744073709551569},{"value":6861336080,"symbolLocation":56,"symbol":"clock_gettime"},{"value":0},{"value":4294967295},{"value":2},{"value":71481140707328},{"value":0},{"value":71481140707328},{"value":6130900344},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8094240408},"cpsr":{"value":4096},"fp":{"value":6130900192},"sp":{"value":6130900112},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":8094226312},"far":{"value":0}},"frames":[{"imageOffset":6024,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":17},{"imageOffset":20120,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":17},{"imageOffset":19888,"symbol":"mach_msg_overwrite","symbolLocation":424,"imageIndex":17},{"imageOffset":19452,"symbol":"mach_msg","symbolLocation":24,"imageIndex":17},{"imageOffset":485364,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":13},{"imageOffset":482976,"symbol":"__CFRunLoopRun","symbolLocation":1212,"imageIndex":13},{"imageOffset":819828,"symbol":"CFRunLoopRunSpecific","symbolLocation":588,"imageIndex":13},{"imageOffset":168760,"symbol":"-[NSRunLoop(NSRunLoop) runMode:beforeDate:]","symbolLocation":212,"imageIndex":21},{"imageOffset":1596964,"symbol":"-[NSRunLoop(NSRunLoop) runUntilDate:]","symbolLocation":64,"imageIndex":21},{"imageOffset":4729460,"symbol":"-[UIEventFetcher threadMain]","symbolLocation":420,"imageIndex":11},{"imageOffset":1134996,"symbol":"__NSThread__start__","symbolLocation":724,"imageIndex":21},{"imageOffset":6096,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":19},{"imageOffset":5248,"symbol":"thread_start","symbolLocation":8,"imageIndex":19}]},{"id":3345636,"name":"com.apple.NSURLConnectionLoader","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":274959511322624},{"value":0},{"value":274959511322624},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":2},{"value":0},{"value":0},{"value":0},{"value":64019},{"value":2816},{"value":0},{"value":18446744073709551569},{"value":6861336080,"symbolLocation":56,"symbol":"clock_gettime"},{"value":0},{"value":4294967295},{"value":2},{"value":274959511322624},{"value":0},{"value":274959511322624},{"value":6134340920},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8094240408},"cpsr":{"value":4096},"fp":{"value":6134340768},"sp":{"value":6134340688},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":8094226312},"far":{"value":0}},"frames":[{"imageOffset":6024,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":17},{"imageOffset":20120,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":17},{"imageOffset":19888,"symbol":"mach_msg_overwrite","symbolLocation":424,"imageIndex":17},{"imageOffset":19452,"symbol":"mach_msg","symbolLocation":24,"imageIndex":17},{"imageOffset":485364,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":13},{"imageOffset":482976,"symbol":"__CFRunLoopRun","symbolLocation":1212,"imageIndex":13},{"imageOffset":819828,"symbol":"CFRunLoopRunSpecific","symbolLocation":588,"imageIndex":13},{"imageOffset":991264,"symbol":"+[__CFN_CoreSchedulingSetRunnable _run:]","symbolLocation":416,"imageIndex":22},{"imageOffset":1134996,"symbol":"__NSThread__start__","symbolLocation":724,"imageIndex":21},{"imageOffset":6096,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":19},{"imageOffset":5248,"symbol":"thread_start","symbolLocation":8,"imageIndex":19}]},{"id":3358146,"name":"com.apple.SwiftUI.AsyncRenderer","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":28363032014880768},{"value":0},{"value":28363032014880768},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":2},{"value":0},{"value":0},{"value":0},{"value":6603783},{"value":26880},{"value":0},{"value":18446744073709551569},{"value":6861336080,"symbolLocation":56,"symbol":"clock_gettime"},{"value":0},{"value":4294967295},{"value":2},{"value":28363032014880768},{"value":0},{"value":28363032014880768},{"value":6132047048},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8094240408},"cpsr":{"value":4096},"fp":{"value":6132046896},"sp":{"value":6132046816},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":8094226312},"far":{"value":0}},"frames":[{"imageOffset":6024,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":17},{"imageOffset":20120,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":17},{"imageOffset":19888,"symbol":"mach_msg_overwrite","symbolLocation":424,"imageIndex":17},{"imageOffset":19452,"symbol":"mach_msg","symbolLocation":24,"imageIndex":17},{"imageOffset":485364,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":13},{"imageOffset":482976,"symbol":"__CFRunLoopRun","symbolLocation":1212,"imageIndex":13},{"imageOffset":819828,"symbol":"CFRunLoopRunSpecific","symbolLocation":588,"imageIndex":13},{"imageOffset":168760,"symbol":"-[NSRunLoop(NSRunLoop) runMode:beforeDate:]","symbolLocation":212,"imageIndex":21},{"imageOffset":152832,"symbol":"-[NSRunLoop(NSRunLoop) run]","symbolLocation":64,"imageIndex":21},{"imageOffset":3626712,"symbol":"specialized static DisplayLink.asyncThread(arg:)","symbolLocation":792,"imageIndex":10},{"imageOffset":3625896,"symbol":"@objc static DisplayLink.asyncThread(arg:)","symbolLocation":72,"imageIndex":10},{"imageOffset":1134996,"symbol":"__NSThread__start__","symbolLocation":724,"imageIndex":21},{"imageOffset":6096,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":19},{"imageOffset":5248,"symbol":"thread_start","symbolLocation":8,"imageIndex":19}]},{"id":3386814,"frames":[{"imageOffset":5228,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":19}],"threadState":{"x":[{"value":6129184768},{"value":31619847},{"value":6128648192},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6129184768},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":9056531564},"far":{"value":0}}},{"id":3387277,"frames":[{"imageOffset":5228,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":19}],"threadState":{"x":[{"value":6128037888},{"value":33366019},{"value":6127501312},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6128037888},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":9056531564},"far":{"value":0}}},{"triggered":true,"id":3387278,"threadState":{"x":[{"value":268460044},{"value":17231331847},{"value":790275233043},{"value":130062411565631495},{"value":4611689471581101315},{"value":130062411565629440},{"value":184},{"value":0},{"value":18446744073709550527},{"value":184},{"value":7427},{"value":1073742628},{"value":0},{"value":30282515},{"value":119345390129563644},{"value":5751799808},{"value":18446744073709551569},{"value":10713420688},{"value":0},{"value":0},{"value":184},{"value":130062411565629440},{"value":4611689471581101315},{"value":130062411565631495},{"value":5751808536},{"value":790275233043},{"value":17231331847},{"value":17231331847},{"value":51462663}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8094240408},"cpsr":{"value":536875008},"fp":{"value":6130328272},"sp":{"value":6130328192},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":8094226312,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.CoreMotion.CMAltimeterInternalQueue","frames":[{"imageOffset":6024,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":17},{"imageOffset":20120,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":17},{"imageOffset":19888,"symbol":"mach_msg_overwrite","symbolLocation":424,"imageIndex":17},{"imageOffset":19452,"symbol":"mach_msg","symbolLocation":24,"imageIndex":17},{"imageOffset":171840,"symbol":"_xpc_pipe_mach_msg","symbolLocation":56,"imageIndex":23},{"imageOffset":168904,"symbol":"_xpc_pipe_routine","symbolLocation":392,"imageIndex":23},{"imageOffset":17836,"symbol":"_xpc_interface_routine","symbolLocation":204,"imageIndex":23},{"imageOffset":19648,"symbol":"_xpc_look_up_endpoint","symbolLocation":268,"imageIndex":23},{"imageOffset":59764,"symbol":"_xpc_connection_bootstrap_look_up_slow","symbolLocation":296,"imageIndex":23},{"imageOffset":76740,"symbol":"_xpc_connection_init","symbolLocation":1000,"imageIndex":23},{"imageOffset":61696,"symbol":"_xpc_connection_activate_if_needed","symbolLocation":452,"imageIndex":23},{"imageOffset":66884,"symbol":"xpc_connection_resume","symbolLocation":96,"imageIndex":23},{"imageOffset":31088,"symbol":"CLConnection::start()","symbolLocation":76,"imageIndex":24},{"imageOffset":41192,"imageIndex":24},{"imageOffset":8776,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":25},{"imageOffset":16296,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":25},{"imageOffset":46540,"symbol":"_dispatch_lane_serial_drain","symbolLocation":768,"imageIndex":25},{"imageOffset":49444,"symbol":"_dispatch_lane_invoke","symbolLocation":380,"imageIndex":25},{"imageOffset":95116,"symbol":"_dispatch_root_queue_drain_deferred_wlh","symbolLocation":288,"imageIndex":25},{"imageOffset":93144,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":540,"imageIndex":25},{"imageOffset":13952,"symbol":"_pthread_wqthread","symbolLocation":288,"imageIndex":19},{"imageOffset":5236,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":19}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4339400704,
    "size" : 49152,
    "uuid" : "19235f86-b5e4-382b-a45c-43cf8423b03c",
    "path" : "\/private\/var\/containers\/Bundle\/Application\/47F8F0FC-1792-40D6-B5FF-C168C6BF383F\/AnchorNet3.app\/AnchorNet3",
    "name" : "AnchorNet3"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4344266752,
    "size" : 6914048,
    "uuid" : "1254997a-4be7-3866-961b-54837c24309a",
    "path" : "\/private\/var\/containers\/Bundle\/Application\/47F8F0FC-1792-40D6-B5FF-C168C6BF383F\/AnchorNet3.app\/AnchorNet3.debug.dylib",
    "name" : "AnchorNet3.debug.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4342120448,
    "size" : 49152,
    "uuid" : "be056522-26b1-3a50-8ad1-93ac99fcdc9c",
    "path" : "\/private\/preboot\/Cryptexes\/OS\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4647337984,
    "size" : 114688,
    "uuid" : "0215595f-b619-329e-9a26-0214183704d4",
    "path" : "\/System\/Library\/CoreImage\/CIBarcode.cifilter\/CIBarcode",
    "name" : "CIBarcode"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4648157184,
    "size" : 475136,
    "uuid" : "1bfb4d7e-cbed-3737-b8be-06a42a342ced",
    "path" : "\/System\/Library\/CoreImage\/PortraitFilters.cifilter\/PortraitFilters",
    "name" : "PortraitFilters"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4647239680,
    "size" : 16384,
    "uuid" : "1fbdae2d-ac47-3df4-b08b-d4a8c9e6c7f8",
    "path" : "\/System\/Library\/CoreImage\/CIPassThrough.cifilter\/CIPassThrough",
    "name" : "CIPassThrough"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4647665664,
    "size" : 81920,
    "uuid" : "9bfb1521-475e-3636-8f13-7b473ff3bb7d",
    "path" : "\/System\/Library\/CoreImage\/CIInpainting.cifilter\/CIInpainting",
    "name" : "CIInpainting"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6702010368,
    "size" : 5898240,
    "uuid" : "827baeda-1659-3a64-810f-af0c7a2f704a",
    "path" : "\/usr\/lib\/swift\/libswiftCore.dylib",
    "name" : "libswiftCore.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 9993109504,
    "size" : 12439552,
    "uuid" : "8fc080a8-c45d-39ce-a388-71f81329e522",
    "path" : "\/System\/Library\/Frameworks\/SwiftUICore.framework\/SwiftUICore",
    "name" : "SwiftUICore"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7480627200,
    "size" : 278528,
    "uuid" : "75c2afba-1b43-3a73-8e02-f3129e8c7db3",
    "path" : "\/System\/Library\/PrivateFrameworks\/AttributeGraph.framework\/AttributeGraph",
    "name" : "AttributeGraph"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6803890176,
    "size" : 19668992,
    "uuid" : "22b531e6-3b13-3950-89d8-5956507241c3",
    "path" : "\/System\/Library\/Frameworks\/SwiftUI.framework\/SwiftUI",
    "name" : "SwiftUI"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6771310592,
    "size" : 32579584,
    "uuid" : "f893f860-ffc0-32f4-a0c1-5c31c3672dfc",
    "path" : "\/System\/Library\/PrivateFrameworks\/UIKitCore.framework\/UIKitCore",
    "name" : "UIKitCore"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6757404672,
    "size" : 3850240,
    "uuid" : "7749f1e0-a6d0-370b-90c4-d99504f02505",
    "path" : "\/System\/Library\/Frameworks\/QuartzCore.framework\/QuartzCore",
    "name" : "QuartzCore"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6729228288,
    "size" : 5521408,
    "uuid" : "32fded28-64a9-33b9-a705-29653bf190cb",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/CoreFoundation",
    "name" : "CoreFoundation"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 8022966272,
    "size" : 36864,
    "uuid" : "29a430c9-e792-319c-bebe-4178411237ef",
    "path" : "\/System\/Library\/PrivateFrameworks\/GraphicsServices.framework\/GraphicsServices",
    "name" : "GraphicsServices"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7368486912,
    "size" : 536896,
    "uuid" : "c9762686-7794-309a-af40-458f2607586d",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 8094220288,
    "size" : 237540,
    "uuid" : "c74b22bf-aff5-3135-b0a9-2d143312cbb8",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6954733568,
    "size" : 4231168,
    "uuid" : "23f41922-4c97-3ec8-ab56-40749b473a2b",
    "path" : "\/System\/Library\/Frameworks\/CoreMotion.framework\/CoreMotion",
    "name" : "CoreMotion"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 9056526336,
    "size" : 53236,
    "uuid" : "95f6b535-bee0-329c-b349-f56841564040",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6861295616,
    "size" : 524284,
    "uuid" : "efd3c5dd-0ccf-378c-91ca-d966365f6b6b",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6708391936,
    "size" : 13717504,
    "uuid" : "9d71008f-5c7b-38df-a379-8530a2408e3e",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Foundation",
    "name" : "Foundation"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6751232000,
    "size" : 3952640,
    "uuid" : "fe7ccb67-e264-3789-8c1c-65ee7b52891f",
    "path" : "\/System\/Library\/Frameworks\/CFNetwork.framework\/CFNetwork",
    "name" : "CFNetwork"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 9056833536,
    "size" : 294912,
    "uuid" : "97b25fff-3ffd-3173-bd62-4d367b1f85a2",
    "path" : "\/usr\/lib\/system\/libxpc.dylib",
    "name" : "libxpc.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7292276736,
    "size" : 221184,
    "uuid" : "d99bc9ee-d8ce-37c4-b12c-73a9d485228b",
    "path" : "\/System\/Library\/PrivateFrameworks\/LocationSupport.framework\/LocationSupport",
    "name" : "LocationSupport"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6861008896,
    "size" : 286720,
    "uuid" : "626ae56e-ca59-3d32-b2e6-64d2f66d9d8b",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  }
],
  "sharedCache" : {
  "base" : 6683688960,
  "size" : 4377460736,
  "uuid" : "e226153a-3ac0-3129-a7de-d0b886dc4de9"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.4G resident=0K(0%) swapped_out_or_unallocated=1.4G(100%)\nWritable regions: Total=671.2M written=771K(0%) resident=771K(0%) swapped_out=0K(0%) unallocated=670.5M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               128K        1 \nActivity Tracing                   256K        1 \nAttributeGraph Data               1024K        1 \nAudio                               64K        1 \nCG raster data                     128K        1 \nColorSync                          224K       11 \nCoreAnimation                       32K        2 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           663.0M       58 \nMALLOC guard page                   32K        2 \nSQLite page cache                  512K        4 \nSTACK GUARD                        128K        8 \nStack                             4816K        8 \nVM_ALLOCATE                        352K        5 \n__AUTH                            4359K      468 \n__AUTH_CONST                      79.0M      953 \n__CTF                               824        1 \n__DATA                            31.9M      916 \n__DATA_CONST                      25.6M      965 \n__DATA_DIRTY                      7827K      868 \n__FONT_DATA                        2352        1 \n__INFO_FILTER                         8        1 \n__LINKEDIT                       214.7M        8 \n__LLVM_COV                          10K        1 \n__OBJC_RW                         2963K        1 \n__TEXT                             1.2G      977 \n__TPRO_CONST                       272K        2 \nlibnetwork                         128K        8 \nmapped file                      176.5M       24 \nowned unmapped memory              192K        1 \npage table in kernel               771K        1 \nshared memory                       80K        4 \n===========                     =======  ======= \nTOTAL                              2.4G     5305 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.CoreMotion.CMAltimeterInternalQueue"
  }
},
  "logWritingSignature" : "27206cb28c64c30ca7a46d3f252360beb5805b67",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "6081ed9716bb6d61d81d5014",
      "factorPackIds" : {
        "BIFROST_PROD_1" : "67a0f82df877c042e9211569"
      },
      "deploymentId" : 250003380
    },
    {
      "rolloutId" : "654d8c0661e7447155256fcd",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "677c81a16154474121da13cb"
      },
      "deploymentId" : 250000264
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "582596be-1d4a-408d-901b-5b311c006a4a",
      "experimentId" : "65f31ccb74b6f500a45abda4",
      "deploymentId" : 400000026
    }
  ]
}
}
</a>
, hence the post.

Exception Type: EXC_RESOURCE (SIGKILL) Exception Codes: 0x0000000000020000, 0x0000000000000000 Termination Reason: PORT_SPACE 14123288431434006528 (Limit 131072 ports) Exceeded system-wide per-process Port Limit

Triggered by Thread: 5

Thread 5 name: Dispatch queue: com.apple.CoreMotion.CMAltimeterInternalQueue Thread 5 Crashed: 0 libsystem_kernel.dylib 0x1e2741788 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x1e2744e98 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x1e2744db0 mach_msg_overwrite + 424 3 libsystem_kernel.dylib 0x1e2744bfc mach_msg + 24 4 libxpc.dylib 0x21bd6ef40 _xpc_pipe_mach_msg + 56 5 libxpc.dylib 0x21bd6e3c8 _xpc_pipe_routine + 392 6 libxpc.dylib 0x21bd495ac _xpc_interface_routine + 204 7 libxpc.dylib 0x21bd49cc0 _xpc_look_up_endpoint + 268 8 libxpc.dylib 0x21bd53974 _xpc_connection_bootstrap_look_up_slow + 296 9 libxpc.dylib 0x21bd57bc4 _xpc_connection_init + 1000 10 libxpc.dylib 0x21bd54100 _xpc_connection_activate_if_needed + 452 11 libxpc.dylib 0x21bd55544 xpc_connection_resume + 96 12 LocationSupport 0x1b2a7c970 CLConnection::start() + 76 13 LocationSupport 0x1b2a7f0e8 0x1b2a75000 + 41192 14 libdispatch.dylib 0x198f2d248 _dispatch_call_block_and_release + 32 15 libdispatch.dylib 0x198f2efa8 _dispatch_client_callout + 20 16 libdispatch.dylib 0x198f365cc _dispatch_lane_serial_drain + 768 17 libdispatch.dylib 0x198f37124 _dispatch_lane_invoke + 380 18 libdispatch.dylib 0x198f4238c _dispatch_root_queue_drain_deferred_wlh + 288 19 libdispatch.dylib 0x198f41bd8 _dispatch_workloop_worker_thread + 540 20 libsystem_pthread.dylib 0x21bcfd680 _pthread_wqthread + 288 21 libsystem_pthread.dylib 0x21bcfb474 start_wqthread + 8

Hi,

I can confirm that by commenting out the follow lines of code the app no longer crashes... I can only therefore conclude that the CMAltimeter is eating up all the system-wide per-process ports(?). Any ideas why this could be...?

    if(CMAltimeter.isRelativeAltitudeAvailable()) {
        altimeter.startRelativeAltitudeUpdates(to: OperationQueue.current!, withHandler: { data, error in
            if !(error != nil) {
                DispatchQueue.main.async {
                    appData.recordPressure(value: Double(truncating: data!.pressure) * 10)
                    }
                }
        })
    }

Yowsers! Someone is running the system out of Mach ports, which never ends well.

Written by BDN0001 in 824319022
I can confirm that by commenting out the follow lines of code the app no longer crashes

That’s a very useful discovery. Isolating Mach port leaks is a hard problem in general, and knowing that it’s related to one specific subsystem is an important clue.

If you leave this code enabled but disable your actual code — that is, comment out the call to recordPressure(…) — do you still see the problem?

If so, that rules out anything except CMAltimeter.

Share and Enjoy

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

Hi Quinn,

I tried your suggestion overnight with Dispatch and recordPressure lines commented out. But... the app crashed again. Could it be something to do with the use of a CMAltimeter State variable:

@State private var altimeter: CMAltimeter = CMAltimeter()

I comment this line out too when I comment out the function block.

Should CMAltimeter not be held as a State variable, but referenced directly?

Thanks, Brendan

Here is the relevant crash report:

Thread 8 name: Dispatch queue: com.apple.CoreMotion.CMAltimeterInternalQueue Thread 8 Crashed: 0 libsystem_kernel.dylib 0x1e2f90788 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x1e2f93e98 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x1e2f93db0 mach_msg_overwrite + 424 3 libsystem_kernel.dylib 0x1e2f93bfc mach_msg + 24 4 libxpc.dylib 0x21c645f30 _xpc_pipe_mach_msg + 56 5 libxpc.dylib 0x21c6453b8 _xpc_pipe_routine + 392 6 libxpc.dylib 0x21c6204e0 _xpc_interface_routine + 204 7 libxpc.dylib 0x21c620c00 _xpc_look_up_endpoint + 268 8 libxpc.dylib 0x21c62a8b4 _xpc_connection_bootstrap_look_up_slow + 296 9 libxpc.dylib 0x21c62eb04 _xpc_connection_init + 1000 10 libxpc.dylib 0x21c62b040 _xpc_connection_activate_if_needed + 452 11 libxpc.dylib 0x21c62c484 xpc_connection_resume + 96 12 LocationSupport 0x1b324e978 CLConnection::start() + 76 13 LocationSupport 0x1b32510f0 0x1b3247000 + 41200 14 libdispatch.dylib 0x1995f9248 _dispatch_call_block_and_release + 32 15 libdispatch.dylib 0x1995fafa8 _dispatch_client_callout + 20 16 libdispatch.dylib 0x1996025cc _dispatch_lane_serial_drain + 768 17 libdispatch.dylib 0x199603124 _dispatch_lane_invoke + 380 18 libdispatch.dylib 0x19960e38c _dispatch_root_queue_drain_deferred_wlh + 288 19 libdispatch.dylib 0x19960dbd8 _dispatch_workloop_worker_thread + 540 20 libsystem_pthread.dylib 0x21c5d4680 _pthread_wqthread + 288 21 libsystem_pthread.dylib 0x21c5d2474 start_wqthread + 8

If you’re gonna post a crash report, please use an attachment, per the advice in Posting a Crash Report. Or if you wanna post snippets, use a code block (with triple backquote delimiters). DevForums uses Markdown syntax and if you post preformatted text as is then the results are pretty much unreadable.

Written by BDN0001 in 824757022
Could it be something to do with the use of a CMAltimeter State variable

Possibly. The rules for State are tricky. But, again, this is something you can confirm for yourself. If having the variable there causes the problem and removing it prevents the problem then you know exactly what’s going on.

Still, I don’t think it’s a good idea to put important state like this in a State variable. Even if it isn’t involved in this issue, binding your views directly to system APIs like this is suboptimal. For example, it prevents you from testing your views properly. A better options is to have your view depend on an observable model object and then have model-level code update that from the altimeter (when you test, you can disable this code and update the properties manually).

Additionally, if you take this approach then you can add log points (or breakpoints) to your model initialiser and deinitialiser and know exactly what its lifecycle is.

Share and Enjoy

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

Hi Quinn, resolved...

I can report that removing:

@State var altimeter: CMAltimeter = CMAltimeter()

...and referring to CMAltimeter directly has not resulted in a further crash.

I'm not sure I fully understand why this would have caused an issue. Is this because CMAltimeter isn't a class that needs to be instantiated but rather a persistent service in its own right. Does this apply equally to CLLocationManager() and CMMotionManager() etc.

How do I determine the difference between a persistent service and a structure/class?

Thanks, Brendan

Accepted Answer

First, lemme define two terms, albeit vaguely:

  • A light object is something that you can create and destroy willy-nilly.

  • A heavy object owns a resource and thus it makes sense to create one instance and share it (or maybe a small number of instances).

It’s hard to know from the outside whether a particular object is heavy or ‘light’. Sometimes that information is covered in the documentation — a good example of this is URLSession, where we go out of our way to document that it’s heavy — but in other cases you just have to infer it from the examples in the docs, the published sample code, and so on.

This thread suggests that CMAltimeter is heavier than it looks, and thus it makes sense to maintain a small number of instances.


However, there’s something else going on here. Even with a heavy object, creating and destroying the object a bunch of times shouldn’t leak Mach ports. The object should clean up after itself. However, I played around this myself and encountered something weird. Consider this code:

func test() {
    let before = machPortCount()
    autoreleasepool {
        for _ in 0..<100 {
            _ = CMAltimeter()
        }
    }
    let after = machPortCount()
    print(before, after)
}

where machPortCount() is a function I wrote that returns the number of Mach ports allocated by this process [1]. I then wired it up to a button and ran the app on a device (iOS 18.3.1). Every time I tapped the button, the count goes up by about 200!

122 331
335 548
550 748
750 949
912 1123

That’s problematic to say the least.

So, given the above, my advice is:

  • File a bug against CMAltimeter. Allocating and deallocating the object shouldn’t leak Mach ports [2]. When you’re done, please post the bug number here so that I can add my analysis to it.

  • The workaround is to reduce the number of CMAltimeter objects you allocate to the bare minimum.

Share and Enjoy

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

[1] Technically, it’s the number of port names in this task’s namespace. I implemented this function using Mach APIs. I’m not gonna share the code because it’s too large, but if you want a taste of how this works you can check out the (ancient) MachPortDump sample code.

[2] I think it’s actually leaking objects, and those objects own the Mach ports, but that’s a distinction that doesn’t make a difference. You’re gonna run out of Mach ports way earlier than you run out of memory.

Bug FB16534793 reported.

ps - Great support, thank you!

Termination due to Exceed Port Limit
 
 
Q