Skip to content

Maui Android runtime crash - major_copy_or_mark_object_concurrent_no_evacuation #116542

Closed

Description

@b12kab

Description

Crash from the Play console:

major_copy_or_mark_object_concurrent_no_evacuation-sybmolized.txt


pid: 0, tid: 15331 >>> com.example.app <<<

backtrace:
#00 pc 0x00000000002de6b8 /data/app/~~AruafsROUrLkW2r9-fhmqw==/com.example.app-k2kb0MofGrxM2dnyjzAzvw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 1934ce7c22839a0ce1bae35742007bb641759b58)
#1 pc 0x00000000002fc088 /data/app/~~AruafsROUrLkW2r9-fhmqw==/com.example.app-k2kb0MofGrxM2dnyjzAzvw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 1934ce7c22839a0ce1bae35742007bb641759b58)
#2 pc 0x00000000002fb114 /data/app/~~AruafsROUrLkW2r9-fhmqw==/com.example.app-k2kb0MofGrxM2dnyjzAzvw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 1934ce7c22839a0ce1bae35742007bb641759b58)
#3 pc 0x000000000006f584 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+180)
#4 pc 0x0000000000061610 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Reproduction Steps

Not locally reproducible.

Expected behavior

Not to crash during runtime.

Actual behavior

Crashing during runtime.

Regression?

N/A

Known Workarounds

N/A

Configuration

Maui 8.0.40 workload; android 34.0.95

Other information

his crash from Google Pixel 6, Android 15 (SDK 35).

Attached other stack traces from other devices; generally same crash dump

#00 0x00000000002de6b8 /data/app/~~AruafsROUrLkW2r9-fhmqw==/com.example.app-k2kb0MofGrxM2dnyjzAzvw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 1934ce7c22839a0ce1bae35742007bb641759b58)
major_copy_or_mark_object_concurrent_no_evacuation
/__w/1/s/src/mono/mono/sgen/sgen-marksweep-drain-gray-stack.h:137:23
major_scan_object_concurrent_no_evacuation
/__w/1/s/src/mono/mono/sgen/sgen-scan-object.h:59:3
drain_gray_stack_concurrent_no_evacuation
/__w/1/s/src/mono/mono/sgen/sgen-marksweep-drain-gray-stack.h:347:3
drain_gray_stack_concurrent
/__w/1/s/src/mono/mono/sgen/sgen-marksweep.c:1305:10
#1 0x00000000002fc088 /data/app/~~AruafsROUrLkW2r9-fhmqw==/com.example.app-k2kb0MofGrxM2dnyjzAzvw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 1934ce7c22839a0ce1bae35742007bb641759b58)
marker_idle_func
/__w/1/s/src/mono/mono/sgen/sgen-workers.c:363:3
#2 0x00000000002fb114 /data/app/~~AruafsROUrLkW2r9-fhmqw==/com.example.app-k2kb0MofGrxM2dnyjzAzvw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 1934ce7c22839a0ce1bae35742007bb641759b58)
thread_func
/__w/1/s/src/mono/mono/sgen/sgen-thread-pool.c:219:5
#3 0x000000000006f584 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+180)
#4 0x0000000000061610 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Activity

  1. added
    untriaged
    on Jun 11, 2025
  2. b12kab commented on Jun 11, 2025

    @b12kab
    Author
  3. srxqds commented on Jun 12, 2025

    @srxqds
    Contributor

    We have encountered this problem before.

  4. steveisok commented on Jul 24, 2025

    @steveisok
    Member

    /cc @vitek-karas @BrzVlad

    @b12kab .NET 8 for MAUI is out of support. Can you bump to 9 where we have the latest set of fixes?

  5. added
    needs-author-action
    and removed
    untriaged
    on Jul 24, 2025
  6. BrzVlad commented on Jul 25, 2025

    @BrzVlad
    Member

    @b12kab We have a known issue with concurrent GC that we haven't yet been able to reproduce and investigate. I suspect this is what you are encountering here. Could you try with <AndroidEnableSGenConcurrent>False</AndroidEnableSGenConcurrent>

  7. b12kab commented on Jul 25, 2025

    @b12kab
    Author

    @b12kab We have a known issue with concurrent GC that we haven't yet been able to reproduce and investigate. I suspect this is what you are encountering here. Could you try with <AndroidEnableSGenConcurrent>False</AndroidEnableSGenConcurrent>

    Unfortunately we have not been able to repro any of these crashes and find them in the GPC. We are working to move onto .net9 now; I'll add that option in for our .net 9 build; hopefully be ready to publish in a few weeks.

  8. added
    needs-further-triage
    and removed
    needs-author-action
    on Jul 25, 2025
  9. added
    needs-author-action
    and removed
    needs-further-triage
    on Jul 30, 2025
  10. self-assigned this
    on Jul 30, 2025
  11. 9 remaining items

  12. BrzVlad commented on Nov 19, 2025

    @BrzVlad
    Member

    This looks like the crash in not in native code associated with a library, but rather jitted code ? The stacktrace seems to be missing information. What version of .net9 are you using ?

  13. b12kab commented on Nov 19, 2025

    @b12kab
    Author

    % dotnet --version
    9.0.203

  14. BrzVlad commented on Nov 19, 2025

    @BrzVlad
    Member

    That is a very old .net9 (9.0.4 runtime) missing a lot of fixes. Hard to say for sure but I suspect #118331 might be fixing this. Please update to latest .net9 (9.0.11)

  15. b12kab commented on Nov 20, 2025

    @b12kab
    Author

    I've added this to the schedule, but unlikely to release before EOY.

  16. b12kab commented on Feb 9, 2026

    @b12kab
    Author

    We upgraded our code last week in production to % dotnet --version
    9.0.308

    With this (and our previous runtime version) but at same maui version (9.0.100) - are getting a ton of these unknown or unknown, unknown runtime crashes (below); which are not helpful to finding out a root cause for them. We are getting the rare other types of runtime crash, but not really enough to warrant examination of them. These unknown crash types are generally (~80%) occur with the window state is stopped, but not always. Less generally, the shell is changing (~65%).

    I think on the original cause of this ticket - I think the crash is resolved with upgrading - although I'm not sure if the reason for that was runtime or the Maui version (from 9.0.71) bump.

    Unfortunately, now having stranger runtime problems :(

    Exception Type: Unknown (SIGSEGV)
    
    Application Specific Information:
    Segfault
    
    Thread 0 Crashed:
    0   <unknown>                       0x7da6a63a94        <unknown>
    
    
    Exception Type: Unknown (SIGSEGV)
    
    Application Specific Information:
    Segfault
    
    Thread 0 Crashed:
    0   <unknown>                       0x77d18887d0        <unknown>
    1   <unknown>                       0x7718e7c83c        <unknown>
    
  17. b12kab commented on Feb 12, 2026

    @b12kab
    Author
  18. BrzVlad commented on Feb 16, 2026

    @BrzVlad
    Member

    @lateralusX Do you have any idea about these non-descriptive stacktraces ? I believe we had some problems/fixes in the area, but I don't believe 9.0.11 runtime should be impacted. Would it even be worthwhile to symbolicate these ip's ?

  19. lateralusX commented on Feb 17, 2026

    @lateralusX
    Member

    If it's a native crash it should get catched by Mono's sigsegv handler that should have generated some more information around the issue in logcat (including managed stacktrace). Failing to stack walk like above either means that the top frame is managed or some other stack corruption where IP won't point to any meaningful unwind information making Androids libunwind aborting the stackwalk. If it's a managed frame, then I believe we should at least see a managed stackwalk in logcat. I assume the above stacktraces are still produced by Android crash reporter or are they coming from somewhere else?

  20. b12kab commented on Feb 17, 2026

    @b12kab
    Author

    I got these from Sentry.

    In GP console [crashes and ANRs], they look slightly different::


    pid: 0, tid: 26541 >>> com.example <<<

    backtrace:
    #00 pc 0x0000000007c0c2b0 [anon:dalvik-LinearAlloc]

  21. b12kab commented on Feb 18, 2026

    @b12kab
    Author
  22. lateralusX commented on Feb 19, 2026

    @lateralusX
    Member

    That is an IP pointing to JVM/ART allocated memory, not much info that can be extracted out of that and that's why the Android unwinder won't be able to walk the stack since. Do you get a tombstone collected for that crash? Any additional information in logcat?

  23. b12kab commented on Feb 19, 2026

    @b12kab
    Author

    @lateralusX We aren't getting the tombstone or logcat. As part of Sentry we are getting sent user breadcrumbs; they show it crashes somewhere in the user interaction session. They generally (~80%) occur with the window state is stopped, but not always. Less generally, the shell is changing (~65%) from logged in to logged out or the other way around. Making this a mess without a good way to make it less so :(

  24. b12kab commented on Mar 20, 2026

    @b12kab
    Author

    This problem is fixed, so closing it.

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

Metadata

Metadata

Assignees

Labels

area-VM-meta-mononeeds-further-triageos-android

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions