Skip to content

[net11.0] CoreCLR-flavor iOS apps abort in xamarin_vm_initialize ("Failed to initialize the VM") on iPhone 17 / iOS 26.0 with Microsoft.iOS.Sdk.net11.0_26.5 26.5.11527-net11-p5 #25542

@matouskozak

Description

@matouskozak

Summary

iOS apps published with Microsoft.iOS.Sdk.net11.0_26.5 = 26.5.11527-net11-p5 and RuntimeFlavor=coreclr (/p:UseMonoRuntime=false) abort during native startup on iPhone 17 / iOS 26.0 — before any managed code runs. Apps published with UseMonoRuntime=true from the same template / same SDK / same device run fine, so this is specific to the CoreCLR path through the macios native shim.

The abort is EXC_CRASH / SIGABRT ("Abort trap: 6"), asi: libsystem_c.dylib: ["abort() called"], process lifetime ~100 ms. The crash reproduces 100 % of the time, on both Release (R2R) and Debug, on three different iOS app templates (plain dotnet new ios, dotnet new maui, dotnet new maui --sample-content).

Symbolicated stack — CoreCLR Release

Thread 0 Crashed (EXC_CRASH / SIGABRT — "Abort trap: 6")
asi: libsystem_c.dylib: ["abort() called"]

#0  libsystem_kernel.dylib   __pthread_kill +8
#1  libsystem_pthread.dylib  pthread_kill +268
#2  libsystem_c.dylib        __abort +132
#3  libsystem_c.dylib        abort +136
#4  NetiOSDefault            xamarin_register_monoassembly                       (runtime/runtime.m:850)
#5  NetiOSDefault            xamarin_pinvoke_override  [inlined into             (runtime/runtime.m:2593)
                              xamarin_vm_initialize +0x1f8]
#6  NetiOSDefault            xamarin_main + 0x4b0                                (runtime/monotouch-main.m:379)
#7  NetiOSDefault            main + 0x40                                          (main.arm64.mm:62)
#8  dyld                     start + 7116

Raw frames as recorded in the .ips (NetiOSDefault binary UUID 0477fda9-0f54-3913-8fbf-21f5d7ddcff5, image base 0x100e78000, size 0x20000):

imageOffset  symbol+symbolLocation               imageIndex  image
     45260   __pthread_kill +8                        8      libsystem_kernel.dylib
     30736   pthread_kill +268                        9      libsystem_pthread.dylib
    491436   __abort +132                            10      libsystem_c.dylib
    491304   abort +136                              10      libsystem_c.dylib
     33204   (0x81b4)                                 0      NetiOSDefault
     43668   (0xaa94)                                 0      NetiOSDefault
     74524   (0x1231c)                                0      NetiOSDefault
     78948   (0x13464)                                0      NetiOSDefault
     20008   start +7116                             11      dyld

Symbolicated stack — CoreCLR Debug

Thread 0 Crashed (EXC_CRASH / SIGABRT — "Abort trap: 6")

#0-3  same libsystem frames (__pthread_kill / pthread_kill / __abort / abort)
#4  NetiOSDefault            xamarin_register_assembly                           (runtime/delegates.inc:225)
#5  NetiOSDefault            xamarin_vm_initialize + 0x174                       (runtime/runtime.m:2532)
#6  NetiOSDefault            xamarin_main + 0x63c                                (runtime/monotouch-main.m:412)
#7  NetiOSDefault            main + 0x40                                          (main.arm64.mm:62)
#8  dyld                     start + 7116

Raw frames as recorded in the .ips:

imageOffset  imageIndex  image
     18384       0       NetiOSDefault   (0x47d0)
     55664       0       NetiOSDefault   (0xd970)
    120348       0       NetiOSDefault   (0x1d61c)
    126884       0       NetiOSDefault   (0x1efa4)

Symbolication was done locally with atos against a Debug build of dotnet new ios (Microsoft.iOS.Sdk.net11.0_26.5 26.5.11527-net11-p5, preserving dSYM); the dSYM file paths embedded by the build (/Users/builder/azdo/_work/1/s/macios/runtime/runtime.m, etc.) match the macios source tree.

Source of the abort

runtime/runtime.m:2532, inside xamarin_vm_initialize:

bool rv = xamarin_bridge_vm_initialize (propertyCount, propertyKeys, propertyValues);
...
if (!rv)
    xamarin_assertion_message ("Failed to initialize the VM");

runtime/runtime.m:850 (Release frame 4) is the entry of xamarin_register_monoassembly.

Reproduction (minimal)

# Need Xcode 26.5 (beta 2 or final) and .NET SDK 11.0.100-preview.5 or later
dotnet new ios -o app --name NetiOSDefault

dotnet publish app/NetiOSDefault.csproj \
  -c Release -f net11.0-ios -r ios-arm64 --self-contained \
  -p:UseMonoRuntime=false \
  -p:PublishReadyToRunStripDebugInfo=false \
  -p:PublishReadyToRunStripInliningInfo=false \
  -p:EnableCodeSigning=false

Install the resulting .ipa on an iPhone 17 running iOS 26.0 (build 23A330). The app SIGABRTs ~100 ms after launch.

Switching to -p:UseMonoRuntime=true (Mono runtime) on the same template, same device, same SDK runs to completion.

Environment

Component Version
iOS device iPhone 17 (iPhone18,3) — iPhone OS 26.0 build 23A330
Xcode (CI) 26.5 beta 2
Xcode (local repro) 26.5 (final, 17F42)
.NET SDK 11.0.100-preview.5.26276.101 (CI) / 11.0.100-preview.6.26276.119 (local repro)
Microsoft.iOS.Sdk.net11.0_26.5 26.5.11527-net11-p5
Microsoft.iOS.Sdk.net10.0_26.5 26.5.10280
Microsoft.NETCore.App.Runtime.* 11.0.0-preview.5.26276.101
RuntimeFlavor that crashes coreclr
RuntimeFlavor that works mono

Repro matrix (all reproduce)

Publish config App template Iter 0 result
CoreCLR Release (R2R) dotnet new ios crash
CoreCLR Release (R2R) dotnet new maui crash
CoreCLR Release (R2R) dotnet new maui --sample-content crash
CoreCLR Debug dotnet new ios crash
CoreCLR Debug dotnet new maui crash
CoreCLR Debug dotnet new maui --sample-content crash
Mono Release dotnet new ios ✅ passes
Mono Release dotnet new maui ✅ passes
Mono Debug dotnet new ios ✅ passes
Mono Debug dotnet new maui ✅ passes

(Mono MauiSampleContent has an unrelated cleanup-kill timing issue, not the same SIGABRT.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions