Suggested tips for `swift_Concurrency_fatalError` crashes?

Hello all,

I'd appreciate any tips on what to look out for / debugging the crash below.

  • Crashes are from an iOS 18.5 device.
  • Only occurs on release style builds built with Xcode 16.4.

Thanks!

SIGABRT ABORT 0x00000001edd1e1dc

Crashed: com.apple.root.user-initiated-qos.cooperative
0  libsystem_kernel.dylib         0xb1dc __pthread_kill + 8
1  libsystem_pthread.dylib        0x7c60 pthread_kill + 268
2  libsystem_c.dylib              0x772d0 abort + 124
3  libswift_Concurrency.dylib     0x61e8c swift::swift_Concurrency_fatalError(unsigned int, char const*, ...) + 30
4  libswift_Concurrency.dylib     0x61eac setupStandardConcurrencyDescriptors() + 30
5  libswift_Concurrency.dylib     0x66250 swift_task_dealloc + 132
6  libswift_Concurrency.dylib     0x61424 asyncLet_finish_after_task_completion(swift::AsyncContext*, swift::AsyncLet*, void (swift::AsyncContext* swift_async_context) swiftasynccall*, swift::AsyncContext*, void*) + 88
7  libswift_Concurrency.dylib     0x5c134 swift::runJobInEstablishedExecutorContext(swift::Job*) + 292
8  libswift_Concurrency.dylib     0x5d5c8 swift_job_runImpl(swift::Job*, swift::SerialExecutorRef) + 156
9  libdispatch.dylib              0x13db0 _dispatch_root_queue_drain + 364
10 libdispatch.dylib              0x1454c _dispatch_worker_thread2 + 156
11 libsystem_pthread.dylib        0x9d0 _pthread_wqthread + 232
12 libsystem_pthread.dylib        0xaac start_wqthread + 8

It would be helpful if you could provide more information about the code. A reproducer would be best.

Thanks for the reply. I know it would have been helpful to provide code and I'm not sure I can distill it down, which is why I was wondering if there were any tips.

After a bit of elimination, the problematic code is something like the below. If I await these three serially, the code does not crash. I'm trying to figure out which combination is more crash prone. I use this async let pattern in other places around the codebase and they do not crash, either.

func getStuffFromNetwork(apiClient: APIClient) async throws -> Stuff
   async let data1Async = apiClient.request(…)
   async let data2Async = apiClient.request(…)
   async let data3Async = apiClient.request(…)

   let (data1, data2, data3) = try await (data1Async, data2Async, data3Async)
   // process data to make stuff
   return stuff
}