Repository navigation
Description
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597055&view=results
Build error leg or test failing: android-x64 Release NativeAOT / android-arm64 Release NativeAOT - Build product (monodroid-nativeaot.cs)
KBE authoring guidance (ci-failure-scan)
Error Detailsis for readers. Paste the full exception, stack trace, or build error excerpt so the failure is understandable without opening the raw log.- Build Analysis parses only the single JSON block under
Error Message. ErrorPatternuses .NETSingleline | IgnoreCase | NonBacktrackingmatching with a 50ms-per-line timeout.- Keep the regex anchored, prefer
[^\n]*over.*, and avoid catastrophic backtracking. - Set
BuildRetrytotrueonly for a clear infrastructure retry case.ExcludeConsoleLogdisables Helix console-log scanning.
Error Details
The Build product step fails for every Android NativeAOT leg (android-x64 Release NativeAOT, android-arm64 Release NativeAOT) in runtime-extra-platforms (definition 154) while compiling src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs under net11.0. The new memory-safety analysis (SYSLIB/CS937x diagnostics) rejects the template's unsafe/extern usage:
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(19,38): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(116,24): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(168,19): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(487,24): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(50,33): error CS9389: 'extern' member must be marked 'unsafe' or 'safe'.
Build FAILED.
The break reproduces across consecutive builds (source build 1597055, finished 2026-09-15, and follow-up build 1598688, finished 2026-09-16), so it is a persistent product break rather than a transient failure. Send to Helix is skipped because the build never produces test binaries.
Error Message
{
"ErrorMessage": "",
"ErrorPattern": "monodroid-nativeaot\\.cs\\([0-9]+,[0-9]+\\): error CS9389: 'extern' member must be marked 'unsafe' or 'safe'(redacted)",
"BuildRetry": false,
"ExcludeConsoleLog": false
}Agentic workflow metadata (ci-failure-scan)
Workflow artifact: ci-failure-scan
Artifact kind: kbe-verification
Verified match count: 6 hits in failure.log
Filed by ci-failure-scan (detection only). ci-failure-fix walks open [ci-scan] KBEs and either opens a small fix PR or comments here to loop in owners — it never disables the test.
Note
This issue was generated by the ci-failure-scan Copilot workflow.
Generated by CI Outer-Loop Failure Scanner · opus48 · 450.2 AIC · ⌖ 21.7 AIC · ⊞ 19.7K · ◷
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 0 | 0 | 0 |
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dotnet-policy-service commentedon Sep 17, 2026
Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Sep 17, 2026
Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.
github-actions commentedon Sep 18, 2026
Workflow artifact: ci-fix
Artifact kind: handoff
Linked KBE: #134115
Note
AI/Copilot-generated triage note.
This Known Build Error has no safe automated code change. The Android NativeAOT template has multiple C# memory-safety diagnostics across pointer-bearing JNI entry points and a
LibraryImportdeclaration; a modifier-only change without compiling all Android targets risks changing the interop safety contract.Root cause (best analysis)
The
Build productstep rejectsmonodroid-nativeaot.csunder the new memory-safety rules: severalunsafemodifiers are ineffective and the native crypto initialization import requires an explicitsafeorunsafecontext. The fix must classify every pointer-bearing declaration correctly, rather than suppressing or muting the diagnostics.Evidence
Suggested reviewers / area contacts
area-Infrastructure):@agocke,@dotnet/runtime-infrastructureA fix likely scopes
unsafeto the JNI declarations that require pointers and explicitly annotates the native import after Android-target compilation verifies the generated stubs.Structured data:
{ "artifact_kind": "handoff", "linked_kbe": 134115, "workflow_artifact": "ci-fix" }akoeplinger commentedon Sep 23, 2026
Fixed in main by #134212, backported to release/11.0 in #134365