swift-nio: Version 2.60.0 causing app to crash when launched on iOS 15.5 simulator

Expected behavior

When running our iOS app on an iOS 15.5 simulator with the swift-nio package version 2.60.0, our app launches and runs as expected.

Actual behavior

When running on a iOS 15.5 simulator while using swift-nio 2.60.0, the app launches and then immediately crashes with Thread 1: signal SIGABRT

When run on a iOS 16.4 simulator the app runs as expected.

Workaround

Downgrade to swift-nio version 2.59.0 and the app runs fine on iOS 15.5 simulators.

System & version information

OS System - MacOS 13.6 (22G120) Processer type - Attempted on both Intel and Apple-silicon Xcode - 14.3.1 (14E300c) Xcode simulators - iPhone 12 | iOS 15.5 & iOS 16.4

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 2
  • Comments: 26 (14 by maintainers)

Commits related to this issue

Most upvoted comments

We just released a new version that backs out the new API: https://github.com/apple/swift-nio/releases/tag/2.61.0. Please confirm that this fixes the crash

Same problem on macOS 12.3

Termination Reason:    Namespace DYLD, Code 4 Symbol missing
Symbol not found: _swift_getExtendedExistentialTypeMetadata
Referenced from: /Applications/MyApp_Test.app/Contents/MacOS/MyApp_Test
Expected in: /usr/lib/swift/libswiftCore.dylib
(terminated at launch; ignore backtrace)

Application Specific Information:
Symbol not found: _swift_getExtendedExistentialTypeMetadata
Referenced from: /Applications/MyApp_Test.app/Contents/MacOS/MyApp_Test
Expected in: /usr/lib/swift/libswiftCore.dylib

I just hit this, and my crash was on device. Rolling back to 2.59.0 fixed the issue for me as well.

@dnadoba this has a stack trace

Incident Identifier: 1086025F-7F64-42EC-8CAF-D9724CBAB527
CrashReporter Key:   40D309A8-4B1A-C8AB-A1EF-CB71C1CC050A
Hardware Model:      MacBookPro14,3
Process:             APP_NAME [82754]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/2EF156A4-64B6-40FC-AC71-03A0E58CE698/data/Containers/Bundle/Application/0A73DFE0-D246-4BB8-AFC9-1D6ED0F5AA61/APP_NAME.app/APP_NAME
Identifier:          com.APP_NAME.app
Version:             1.0 (1)
Code Type:           X86-64 (Native)
Role:                Foreground
Parent Process:      Exited process [82767]
Coalition:           com.apple.CoreSimulator.SimDevice.2EF156A4-64B6-40FC-AC71-03A0E58CE698 [3117]
Responsible Process: SimulatorTrampoline [6243]

Date/Time:           2023-10-25 13:32:11.6325 +0100
Launch Time:         2023-10-25 13:31:53.8895 +0100
OS Version:          macOS 13.6 (22G120)
Release Type:        User
Report Version:      104

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

Thread 0 Crashed:
0   dyld                          	       0x11646ac52 __abort_with_payload + 10
1   dyld                          	       0x116484fd7 abort_with_payload_wrapper_internal + 82
2   dyld                          	       0x116485009 abort_with_payload + 9
3   dyld_sim                      	       0x10aa9f8eb abort_with_payload + 26
4   dyld_sim                      	       0x10aa5f4eb dyld4::halt(char const*) + 375
5   dyld_sim                      	       0x10aa5bc1c dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3070
6   dyld_sim                      	       0x10aa5be42 _dyld_sim_prepare + 379
7   dyld                          	       0x116407424 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 1490
8   dyld                          	       0x116405abc dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 249
9   dyld                          	       0x1164053bd start + 1805


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000002000209  rbx: 0x0000000000000000  rcx: 0x00007ff7bbfd5518  rdx: 0x00007ff7bbfd5990
  rdi: 0x0000000000000006  rsi: 0x0000000000000004  rbp: 0x00007ff7bbfd5560  rsp: 0x00007ff7bbfd5518
   r8: 0x00007ff7bbfd5590   r9: 0x0000000000000000  r10: 0x0000000000000184  r11: 0x0000000000000246
  r12: 0x0000000000000184  r13: 0x00007ff7bbfd5990  r14: 0x0000000000000004  r15: 0x0000000000000006
  rip: 0x000000011646ac52  rfl: 0x0000000000000246  cr2: 0x0000000116484f85
  
Logical CPU:     0
Error Code:      0x02000209 
Trap Number:     133


Binary Images:
       0x1163ff000 -        0x11649afff dyld (*) <3df96f32-b9c9-3566-a6b7-4daebc6d6563> /usr/lib/dyld
       0x10aa5a000 -        0x10aaa7fff dyld_sim (*) <7276a69b-e3b9-3f23-957f-061350a501b4> /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
       0x103f25000 -        0x105a8cfff com.APP_NAME.app (1.0) <36759cd9-8a20-3153-9489-5dc59fd4fddf> /Users/USER/Library/Developer/CoreSimulator/Devices/2EF156A4-64B6-40FC-AC71-03A0E58CE698/data/Containers/Bundle/Application/0A73DFE0-D246-4BB8-AFC9-1D6ED0F5AA61/APP_NAME.app/APP_NAME
[...]

Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed

EOF

but it seems to be crashing in dyld. @MatthewTHFisher this seems unrelated to SwiftNIO, it’s crashing in dyld before your binary could be loaded. Can you try again? Maybe with a clean build?