Open vsfeedback opened 1 month ago
As mentioned here: https://github.com/dotnet/maui/issues/21479
We found a workaround. The chrashes vanish if we deactivate concurrent garbage collection in the project settings.
<AndroidEnableSGenConcurrent>False</AndroidEnableSGenConcurrent>
I am not sure about the side effects and impacts on performance. When running calculation processes, we see random pauses of the execution for 300ms or more. I assume this happens when the GC is triggered. I haven't found a way to pause the GC for the duration of our calculations.
Tagging subscribers to this area: @dotnet/area-system-memory See info in area-owners.md if you want to be subscribed.
Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.
Tagging subscribers to this area: @brzvlad See info in area-owners.md if you want to be subscribed.
This issue has been moved from a ticket on Developer Community.
[severity:I'm unable to use this version] The last major release of our software followed our porting of the software from Xamarin.Android to net8.0-android. Everything appeared to go well in our own tests, but we are getting a lot of reports of crashes out in the wild. We have been unable to reproduce any problem in our office, but with tens of thousands of customers using the software every day, this crashing is a major problem for us.
We've been receiving no managed crash reports via our own telemetry, so we suspected this was a runtime issue. Finally a tech-savvy customer has sent us some debug output, which I'll paste below. We also have some sample stack traces from the Play Store telemetry which I will also paste below.
What I urgently need is for someone knowledgeable on runtime issues to advise if there's a component clearly at fault that we can temporarily turn off or avoid, so we can get back to having a stable app. I could roll back to Xamarin.Android but that is not sustainable long term.
I can provide further log output sent by a customer, but cannot post it publicly due to privacy concerns. Sending it securely to Microsoft will be fine.
Original Comments
Feedback Bot on 2/27/2024, 11:29 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Tim Dawson on 2/28/2024, 02:04 AM:
(private comment, text removed)
Tim Dawson on 2/29/2024, 07:52 AM:
(private comment, text removed)
Tim Dawson on 3/5/2024, 07:37 AM:
(private comment, text removed)
Anubhav on 3/9/2024, 10:29 AM:
Tim Dawson Were you able to make any progress in debugging this issue?
Tim Dawson on 3/9/2024, 10:32 AM:
Not really. We can’t reproduce it in the office so we can’t do a lot. I posted it here on the urging of MSFT people on Github, hoping someone would look at the information I’ve made available and shine some light on what might be going wrong.
Timo Pijnappel on 3/18/2024, 02:06 AM:
Any updates on this issue? I am expreriencing very similar crashes in my MAUI app. It crashes during long running processes at random times. Here are some of my logcat outputs:
--------- beginning of crash 03-18 09:51:58.987 6482 6482 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x37 in tid 6482 (ctro.mobile.xrf), pid 6482 (ctro.mobile.xrf) 03-18 09:51:59.299 18813 18813 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone 03-18 09:51:59.304 3061 3061 I /system/bin/tombstoned: received crash request for pid 6482 03-18 09:51:59.305 18813 18813 I crash_dump64: performing dump of process 6482 (target tid = 6482) 03-18 09:51:59.330 18813 18813 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 03-18 09:51:59.330 18813 18813 F DEBUG : Build fingerprint: 'Android/aek/aek:9/2.3.4-ga-rc2/root01172037:userdebug/release-keys' 03-18 09:51:59.330 18813 18813 F DEBUG : Revision: '0' 03-18 09:51:59.330 18813 18813 F DEBUG : ABI: 'arm64' 03-18 09:51:59.330 18813 18813 F DEBUG : pid: 6482, tid: 6482, name: ctro.mobile.xrf >>> com.myApp.mobile.xrf <<< 03-18 09:51:59.330 18813 18813 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x37 03-18 09:51:59.330 18813 18813 F DEBUG : Cause: null pointer dereference 03-18 09:51:59.330 18813 18813 F DEBUG : x0 0000e1ddc4045ae8 x1 00000000000001aa x2 fffffffffffffff8 x3 0000e1ddb255bf80 03-18 09:51:59.330 18813 18813 F DEBUG : x4 0000e1ddb255bff8 x5 0000000000000004 x6 0000e1ddf49be000 x7 00000000001aafe8 03-18 09:51:59.330 18813 18813 F DEBUG : x8 0000000000000000 x9 0000000000000000 x10 0000000000000d48 x11 0000000000000000 03-18 09:51:59.330 18813 18813 F DEBUG : x12 0000000000000000 x13 0000000000000000 x14 003aa6a600000000 x15 00001cdcac000000 03-18 09:51:59.330 18813 18813 F DEBUG : x16 0000e1ddd38065f8 x17 0000e1ddf165fcf0 x18 0000000000000008 x19 0000e1ddc4045ae8 03-18 09:51:59.330 18813 18813 F DEBUG : x20 0000000000000010 x21 0000e1ddb02fb508 x22 0000000000000001 x23 0000000000000000 03-18 09:51:59.330 18813 18813 F DEBUG : x24 0000000000000001 x25 0000e1ddd3815000 x26 0000e1ddd3815ef8 x27 000000007c000000 03-18 09:51:59.330 18813 18813 F DEBUG : x28 0000000004000000 x29 0000fffff83979a0 03-18 09:51:59.330 18813 18813 F DEBUG : sp 0000fffff83979a0 lr 0000e1ddd37a337c pc 0000e1ddd37a4090 03-18 09:51:59.335 18813 18813 F DEBUG : 03-18 09:51:59.335 18813 18813 F DEBUG : backtrace: 03-18 09:51:59.335 18813 18813 F DEBUG : #00 pc 00000000002a4090 /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #01 pc 00000000002a3378 /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #02 pc 000000000029dda0 /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #03 pc 00000000002c6df0 /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #04 pc 00000000002c5f8c /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #05 pc 00000000002c2320 /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #06 pc 00000000002c20ec /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #07 pc 00000000002be8b8 /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #08 pc 00000000002bed9c /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #09 pc 00000000002a686c /data/app/com.myApp.mobile.xrf-tM1OUyaps9RI-h6lD7Vsmw==/split_config.arm64_v8a.apk (offset 0xd8a000) 03-18 09:51:59.335 18813 18813 F DEBUG : #10 pc 000000000000d788 <anonymous:0000e1ddeb731000> 03-18 09:51:59.364 18813 18813 I crash_dump64: type=1400 audit(0.0:1318): avc: denied { read } for name="com.google.android.datatransport.events-shm" dev="mmcblk0p13" ino=917634 scontext=u:r:crash_dump:s0:c115,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c115,c256,c512,c768 tclass=file permissive=1 03-18 09:51:59.364 18813 18813 I crash_dump64: type=1400 audit(0.0:1319): avc: denied { open } for path="/data/data/com.myApp.mobile.xrf/databases/com.google.android.datatransport.events-shm" dev="mmcblk0p13" ino=917634 scontext=u:r:crash_dump:s0:c115,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c115,c256,c512,c768 tclass=file permissive=1 03-18 09:51:59.364 18813 18813 I crash_dump64: type=1400 audit(0.0:1320): avc: denied { getattr } for path="/data/data/com.myApp.mobile.xrf/databases/com.google.android.datatransport.events-shm" dev="mmcblk0p13" ino=917634 scontext=u:r:crash_dump:s0:c115,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c115,c256,c512,c768 tclass=file permissive=1 03-18 09:51:59.364 18813 18813 I crash_dump64: type=1400 audit(0.0:1321): avc: denied { map } for path="/data/data/com.myApp.mobile.xrf/databases/com.google.android.datatransport.events-shm" dev="mmcblk0p13" ino=917634 scontext=u:r:crash_dump:s0:c115,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c115,c256,c512,c768 tclass=file permissive=1
03-15 13:03:47.469 16662 16678 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30003400320044 in tid 16678 (SGen worker), pid 16662 (ctro.mobile.xrf) 03-15 13:03:47.756 17089 17089 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone 03-15 13:03:47.757 3037 3037 I /system/bin/tombstoned: received crash request for pid 16678 03-15 13:03:47.758 17089 17089 I crash_dump64: performing dump of process 16662 (target tid = 16678) 03-15 13:03:47.786 17089 17089 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 03-15 13:03:47.786 17089 17089 F DEBUG : Build fingerprint: 'Android/aek/aek:9/2.3.4-ga-rc2/root01172037:userdebug/release-keys' 03-15 13:03:47.786 17089 17089 F DEBUG : Revision: '0' 03-15 13:03:47.786 17089 17089 F DEBUG : ABI: 'arm64' 03-15 13:03:47.786 17089 17089 F DEBUG : pid: 16662, tid: 16678, name: SGen worker >>> com.myApp.mobile.xrf <<< 03-15 13:03:47.786 17089 17089 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30003400320044 03-15 13:03:47.787 17089 17089 F DEBUG : x0 0030003400320044 x1 0000f576ed849b78 x2 0000f57702fec610 x3 0000000000000000 03-15 13:03:47.787 17089 17089 F DEBUG : x4 0000f57723fff308 x5 0000000000000000 x6 0000000000000000 x7 0000000000b0a4a0 03-15 13:03:47.787 17089 17089 F DEBUG : x8 0000000000000001 x9 0000f576ed848000 x10 0000f577123bc048 x11 0000f57702fec610 03-15 13:03:47.787 17089 17089 F DEBUG : x12 0000000000000000 x13 0000000040000000 x14 0000000040220012 x15 0000000000000001 03-15 13:03:47.787 17089 17089 F DEBUG : x16 0000f5771239e3d8 x17 0000f57731ea1cf0 x18 0000ffffde6dbeba x19 0000000000001620 03-15 13:03:47.787 17089 17089 F DEBUG : x20 0000f576ed849b78 x21 0000f57702fec610 x22 0000000000000085 x23 0000000000000010 03-15 13:03:47.787 17089 17089 F DEBUG : x24 0000000000001620 x25 0000000000000001 x26 0000000000000001 x27 0000f577123b9f50 03-15 13:03:47.788 17089 17089 F DEBUG : x28 ffffffffffffffff x29 0000f57703311300 03-15 13:03:47.788 17089 17089 F DEBUG : sp 0000f57703311300 lr 0000f577123844a8 pc 0000f577123844d0 03-15 13:03:47.791 17089 17089 F DEBUG : 03-15 13:03:47.791 17089 17089 F DEBUG : backtrace: 03-15 13:03:47.791 17089 17089 F DEBUG : #00 pc 00000000002ec4d0 /data/app/com.myApp.mobile.xrf-iYkXCIJHS3iitw4OLastEg==/split_config.arm64_v8a.apk (offset 0xdb3000) 03-15 13:03:47.791 17089 17089 F DEBUG : #01 pc 00000000002de5f4 /data/app/com.myApp.mobile.xrf-iYkXCIJHS3iitw4OLastEg==/split_config.arm64_v8a.apk (offset 0xdb3000) 03-15 13:03:47.791 17089 17089 F DEBUG : #02 pc 00000000002fbe70 /data/app/com.myApp.mobile.xrf-iYkXCIJHS3iitw4OLastEg==/split_config.arm64_v8a.apk (offset 0xdb3000) 03-15 13:03:47.791 17089 17089 F DEBUG : #03 pc 00000000002faefc /data/app/com.myApp.mobile.xrf-iYkXCIJHS3iitw4OLastEg==/split_config.arm64_v8a.apk (offset 0xdb3000) 03-15 13:03:47.791 17089 17089 F DEBUG : #04 pc 0000000000083114 /system/lib64/libc.so (__pthread_start(void*)+36) 03-15 13:03:47.791 17089 17089 F DEBUG : #05 pc 00000000000233bc /system/lib64/libc.so (__start_thread+68) 03-15 13:03:47.828 17089 17089 I crash_dump64: type=1400 audit(0.0:5886): avc: denied { read } for name="com.google.android.datatransport.events-shm" dev="mmcblk0p13" ino=917934 scontext=u:r:crash_dump:s0:c102,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c102,c256,c512,c768 tclass=file permissive=1 03-15 13:03:47.828 17089 17089 I crash_dump64: type=1400 audit(0.0:5887): avc: denied { open } for path="/data/data/com.myApp.mobile.xrf/databases/com.google.android.datatransport.events-shm" dev="mmcblk0p13" ino=917934 scontext=u:r:crash_dump:s0:c102,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c102,c256,c512,c768 tclass=file permissive=1
I have tons of those. All look a bit different. I have no idea where to start searching for a solution. I’m really thankful for any advice.
Jonathan Pryor [MSFT] on 4/11/2024, 11:47 AM:
We would ideally like a repro, or at minimum all the relevant
adb logcat
output, particularly output before theFatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
message. “Relevant output” being output from the originating PID; for example, given this message:Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x37 in tid 6482 (ctro.mobile.xrf), pid 6482 (ctro.mobile.xrf)
we’d want all messages from PID 6482.
For example, consider https://github.com/dotnet/runtime/issues/96872, which was an assertion failure leading to a crash. This left a message in
adb logcat
, but it was before theFatal signal …
message:* Assertion at /__w/1/s/src/mono/mono/metadata/object.c:657, condition `lock->done' not met
Just the tombstone, or just
adb logcat
output starting withFatal signal
, will not contain such assertion messages.See also https://github.com/dotnet/runtime/issues/98933, which appears to be the “original” report of the “Random SIGSEGVs after porting” issue.
Tim Dawson on 4/12/2024, 02:41 AM:
Jonathan, did I not upload an entire “tombstone” report sent to us by a customer a few posts up? That contains comprehensive logcat output.
Timo Pijnappel on 8/27/2024, 06:08 AM:
Is there any progress on this? These crashes are still happening, for multiple people as seen in multiple issues on GitHub (Maui, dotnet/runtime). I will gladly assist with debugging. I cannot reproduce the crash, but I can trigger it once or twice a day on my Android device in release mode.
Here is a full logcat of the issue.
LOG-27.08.2024.log