Skip to content

[CoreCLR] MarshalMethodsAppRuns crashes in Java_mono_android_TypeManager_n_activate #12206

Closed

Description

@matouskozak

Android framework version

  • net11.0-android (Preview)

Affected platform version

  • dotnet/android PR pipeline definition 333 on 2026-07-21–22
  • Android x64 emulator
  • CoreCLR
  • The newest public artifact uses .NET SDK 11.0.100-preview.7.26365.101

Description

MarshalMethodsAppRuns(CoreCLR) is repeatedly crashing during unrelated PR builds.
In a sample of 12 distinct PRs targeting main, the test failed in 6 PRs. Five
public test artifacts contain the same native null-dereference; the sixth run
timed out without producing the startup marker.

The test reports:

Failed MarshalMethodsAppRuns(CoreCLR)
Output did not contain XXX:OnStart done!

In the five crash artifacts, logcat shows that the app did not merely miss the
expected log line—it crashed during startup:

Got a SIGSEGV while executing native code.
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0

#01 ... libxamarin-app-clr.so
    Java_mono_android_TypeManager_n_1activate+73

The same signature appeared in these distinct PR builds:

The latest occurrence is available in the public
MSBuild+Emulator 3 test artifact;
the signature is in
MarshalMethodsAppRunsCoreCLR/logcat-failed.log.

Build 1520448 / PR 12195
also failed the same test, but its artifact shows an accepted Activity launch with
no app-process/CoreCLR output before the approximately four-minute timeout. That
run is not counted among the five confirmed native crashes.

Related but distinct work

  • dotnet/android#12201
    tracks a physical-arm64 incremental Fast Deploy typemap mismatch after a C# edit.
    These CI crashes happen in the existing clean MarshalMethodsAppRuns(CoreCLR)
    device test on an x64 emulator and have a different native signature.
  • dotnet/android#12195 and
    dotnet/android#12196 address
    logcat-monitor timing. The public artifacts above contain an actual process
    SIGSEGV, so the recurring failure is not only a missed startup log line.

Steps to reproduce

No standalone local reproduction has been reduced yet.

  1. Run the dotnet-android PR pipeline against an unrelated change targeting
    main.
  2. Inspect macOS > Tests > MSBuild+Emulator 3.
  3. Run MarshalMethodsAppRuns(CoreCLR) on the Android x64 emulator.
  4. Inspect logcat-failed.log when the test does not observe
    XXX:OnStart done!.

Across the sampled PRs, this reproduced as the identical native crash in five
distinct runs.

Expected behavior

The CoreCLR marshal-methods app starts and writes XXX:OnStart done!.

Actual behavior

The app intermittently receives SIGSEGV at address 0x0 in
Java_mono_android_TypeManager_n_1activate+73 before startup completes.

Workaround

None known.

Activity

  1. added
    Area: App Runtime
    needs-triage
    on Jul 22, 2026
  2. added 4 commits that reference this issue on Jul 23, 2026
    8d1e2ef
    919fb63
    7621dbf
    1643fc8
  3. added this to the .NET 11 milestone on Aug 13, 2026
  4. modified the milestones: .NET 11, .NET 12 on Aug 26, 2026
  5. added
    flaky-ci
    on Sep 3, 2026
  6. simonrozsival commented on Oct 5, 2026

    @simonrozsival
    Member

    Marshal methods are removed in .NET 12

  7. locked and limited conversation to collaborators on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: App Runtimeflaky-cineeds-triage

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions