Skip to content

Mono AOT compiler crashes on tvOS with assertion at simd-intrinsics.c:4981 #127792

Description

@github-actions

Reasoning

Mono AOT compilation is crashing with an assertion failure during precompilation of System.Private.CoreLib.dll on tvOS (Apple TV):

Assertion: should not be reached at /Users/runner/work/1/s/src/mono/mono/mini/simd-intrinsics.c:4981
```

Exit code 134 indicates the process was aborted (SIGABRT), consistent with a failed assertion. This is a **product bug** in the Mono AOT compiler's SIMD intrinsics handling code. The assertion at `simd-intrinsics.c:4981` suggests the compiler encountered a code path or SIMD instruction pattern that should not occur, indicating either:

1. A missing implementation for a specific SIMD operation on tvOS
2. An invalid or unexpected IL pattern being fed to the SIMD intrinsics code
3. Platform-specific ARM64 SIMD instruction handling that differs from other Apple platforms

The failure occurred during AOT precompilation of `System.Text.Json.Tests`, specifically when compiling `System.Private.CoreLib.dll`, which contains many vectorized operations.

## Impact on platforms

Failing on tvOS in build 1406427 (2026-05-03):

- **tvos-arm64** / osx.15.amd64.appletv.open / exit code 21 (compilation failure, test assembly never ran)

The crash prevents the test assembly from being built, so no tests execute. Other Apple mobile platforms (iOS, macCatalyst) in the same build did NOT exhibit this crash for the same test assembly, suggesting a tvOS-specific code path or configuration difference in the AOT compiler.

## Errors log

From tvos-arm64 Helix work item `System.Text.Json.Tests` ([console log](https://helix.dot.net/api/2019-06-17/jobs/1a028d92-a44d-4600-9316-18cbc19457ea/workitems/System.Text.Json.Tests/console)):

````
/tmp/helix/working/9F6508DB/p/build/apple/AppleBuild.targets(260,5): error : Precompiling failed for /tmp/helix/working/9F6508DB/w/B49809DB/e/publish/System.Private.CoreLib.dll with exit code 134. [/private/tmp/helix/working/9F6508DB/w/B49809DB/e/publish/ProxyProjectForAOTOnHelix.proj]

/tmp/helix/working/9F6508DB/p/build/apple/AppleBuild.targets(260,5): error : Mono Ahead of Time compiler - compiling assembly /private/tmp/helix/working/9F6508DB/w/B49809DB/e/publish/System.Private.CoreLib.dll [/private/tmp/helix/working/9F6508DB/w/B49809DB/e/publish/ProxyProjectForAOTOnHelix.proj]

/tmp/helix/working/9F6508DB/p/build/apple/AppleBuild.targets(260,5): error : AOTID C4A41DB6-C12D-BA8E-DF57-316EAD22346B [/private/tmp/helix/working/9F6508DB/w/B49809DB/e/publish/ProxyProjectForAOTOnHelix.proj]

/tmp/helix/working/9F6508DB/p/build/apple/AppleBuild.targets(260,5): error : * Assertion: should not be reached at /Users/runner/work/1/s/src/mono/mono/mini/simd-intrinsics.c:4981 [/private/tmp/helix/working/9F6508DB/w/B49809DB/e/publish/ProxyProjectForAOTOnHelix.proj]

No embedded provisioning profile found at /tmp/helix/working/9F6508DB/w/B49809DB/e/System.Text.Json.Tests.app/embedded.mobileprovision! Failed to sign the app!

First build it occurred

First observed (within the scanned window of ~20 builds) in build 1406427, which finished on 2026-05-03T09:02:27Z (commit 805d59a).

Note: This window represents recent builds. The true origin may be earlier if a recent change to vectorized code in System.Private.CoreLib or the Mono AOT compiler triggered this path.

Occurrences in scanned window: Observed in tvos-arm64 AOT test jobs in the most recent build.

Recommended action

  1. Area owner: @dotnet/area-mono-aot should investigate the assertion at src/mono/mono/mini/simd-intrinsics.c:4981.

  2. Investigation steps:

    • Identify which SIMD operation in System.Private.CoreLib.dll triggers the assertion (enable verbose AOT logging with MONO_LOG_LEVEL=debug MONO_LOG_MASK=aot)
    • Check if recent commits to System.Private.CoreLib introduced new vectorized code paths
    • Compare the failing tvOS ARM64 path with the succeeding iOS/macCatalyst ARM64 paths to identify platform-specific conditionals
    • Review the code at simd-intrinsics.c:4981 to understand what condition the assertion is checking
  3. Possible root causes:

    • New SIMD intrinsic added to System.Private.CoreLib without tvOS support in Mono AOT
    • Platform-specific ARM instruction variant on tvOS not handled by the intrinsics code
    • Recent Mono AOT compiler change that broke tvOS SIMD handling
  4. Workaround: If investigation will take time, temporarily disable AOT for the affected assembly on tvOS or skip System.Text.Json.Tests on tvOS NativeAOT to unblock the pipeline. However, the underlying compiler bug must be fixed.

Note

🔒 Integrity filter blocked 3 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #112656 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #122358 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #19443 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by Mobile Platform Failure Scanner · ● 5.2M ·

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions