dotnet / dotnet/android

ANRs after disabling concurrent GC

Open
#10,199 5 comments 0 reactions 0 assignees View on GitHub
Area: App Runtime need-attention
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 20h
Merged PRs (30d)
257

Description

### Android framework version

net8.0-android

### Affected platform version

8.0.17

### Description

Very similar to issue https://github.com/dotnet/android/issues/9365#issuecomment-2971027306.

Many months back, we switched from Xamarin.Android to .NET8. At first we were having many NEW crashes in that version.

They were mostly SIGSEGV, SIGABRT and SIGQUIT. Note that even before, in Xamarin, we had these kind of errors, but there were a LOT more with .NET8.

Following the recommendations in an issue we opened https://github.com/dotnet/runtime/issues/105389#issuecomment-2969409478, it was recommended we disable the concurrent GC. We did so and this had good results as it brought us back to the SIGSEGV levels that we had prior. It's not good to have these issues and we hope to find a resolution in our another ticket but at least we were back to our original level of errors for SIGSEGV, etc.

Now, in .NET8, we still have the SIGSEGV errors that we had prior in Xamarin but some new ANR errors started popping up.

Here are a few stacktraces found in Crashlytics:

[anr_stacktrace.txt](https://github.com/user-attachments/files/20731610/anr_stacktrace.txt)
[anr_stacktrace2.txt](https://github.com/user-attachments/files/20731611/anr_stacktrace2.txt)
[anr_stacktrace3.txt](https://github.com/user-attachments/files/20731609/anr_stacktrace3.txt)

The first 2 seemed to occur sometimes in our Xamarin versions but not as much as with .NET8 versions. The third one only seems to occur since .NET8 version (I base this on the data provided from Crashlytics that specifies when an issue was first discovered.

Let me know what I can do to help troubleshoot the issue

### Steps to Reproduce

We do not have exact steps to reproduce. This occurs apparently randomly. We run the same automated tests regularly and the error will come back but we cannot find a reproduction pattern.

### Did you find any workaround?

No

### Relevant log output

```shell

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.