Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android app crashes with error split_config.arm64_v8a.apk!libmonosgen-2.0.so #109921

Open
sunilsolanki-alight opened this issue Oct 1, 2024 · 17 comments
Assignees
Labels
area-Codegen-JIT-mono os-android untriaged New issue has not been triaged by the area owner

Comments

@sunilsolanki-alight
Copy link

sunilsolanki-alight commented Oct 1, 2024

Description

split_config.arm64_v8a.apk!libmonosgen-2.0.so

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.91 SR9.1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.91 SR9.1

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

split_config.arm64_v8a.apk!libmonosgen-2.0.so
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 31471 >>> xxx.xxx.com <<<

backtrace:
  #00  pc 0x00000000002a42a4  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so 
  dotnet/maui#1  pc 0x00000000002a35bc  /data/app/~~302XoCoC298UZF5Zrmfk_w==/cxxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so
  dotnet/maui#2  pc 0x000000000029dfe4  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (
  dotnet/maui#3  pc 0x00000000002c7034  /data/app/~~302XoCoC298UZF5Zrmfk_w==/cxxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so 
  dotnet/maui#4  pc 0x00000000002c61d0  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so 
  dotnet/maui#5  pc 0x00000000002c2564  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so 
  dotnet/maui#6  pc 0x00000000002c2330  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so 
  dotnet/maui#7  pc 0x00000000002beafc  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (
  dotnet/maui#8  pc 0x00000000002befe0  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (
  dotnet/maui#9  pc 0x00000000002a6ab0  /data/app/~~302XoCoC298UZF5Zrmfk_w==/xxx.xxx.com-KrkS0UsNZ9pNu38dNjI5YQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so
@jfversluis
Copy link
Member

Can you please elaborate a bit more on what you were doing when you saw this? Ideally with a reproduction project? Or at the very least with some relevant code and a detailed description of what you were doing leading up to this?

Based on just this information it will be impossible to diagnose what you were doing and how we can potentially fix it or at least give you some useful information about it.

Thanks

@sunilsolanki-alight
Copy link
Author

Unfortunately I have no way to reliably reproduce this crash, this only happens on production release app not in lower environment. And we only see crashes on google play console.

@PureWeen PureWeen transferred this issue from dotnet/maui Oct 1, 2024
@alexanderdibenedetto
Copy link

Not to pile on, but I also see this issue in the Google Play Console for a production .NET MAUI Android application. Here are some additional details I see there from Google Play:

[split_config.arm64_v8a.apk!libmonosgen-2.0.so]
SIGSEGV

Problem
This issue includes GWP-ASan stack traces. These stack traces provide additional information for debugging.
Recommendation
Some stack traces below include additional details about memory allocation. They may help debug this issue.

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 21357 >>> com.******.app <<<

backtrace:
  #00  pc 0x00000000000d75cc  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#1  pc 0x00000000000ca26c  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#2  pc 0x00000000000ebe4c  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#3  pc 0x00000000000bb168  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#4  pc 0x00000000000bd7a4  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#5  pc 0x00000000000c2470  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#6  pc 0x00000000000c18dc  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#7  pc 0x0000000000152048  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#8  pc 0x0000000000151bac  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#9  pc 0x0000000000004300 

Cause: [GWP-ASan]: Buffer Overflow, 11 bytes right of a 16-byte allocation at 0x7864a2aff0

allocated by thread 21357:
  #00  pc 0x0000000000052e4c  /apex/com.android.runtime/lib64/bionic/libc.so (gwp_asan::AllocationMetadata::CallSiteInfo::RecordBacktrace(unsigned long (*)(unsigned long*, unsigned long))+84)
  dotnet/android#1  pc 0x00000000000534c0  /apex/com.android.runtime/lib64/bionic/libc.so (gwp_asan::GuardedPoolAllocator::allocate(unsigned long, unsigned long)+600)
  dotnet/android#2  pc 0x0000000000044ae4  /apex/com.android.runtime/lib64/bionic/libc.so ((anonymous namespace)::gwp_asan_calloc(unsigned long, unsigned long)+192)
  dotnet/android#3  pc 0x0000000000045450  /apex/com.android.runtime/lib64/bionic/libc.so (calloc+124)
  dotnet/android#4  pc 0x00000000001d6b98  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#5  pc 0x0000000000253bd8  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#6  pc 0x0000000000253d60  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#7  pc 0x000000000023adcc  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#8  pc 0x000000000023c7a8  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_method_signature_checked_slow+312) (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#9  pc 0x000000000023b03c  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#10  pc 0x00000000000d8cec  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#11  pc 0x00000000000bb168  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#12  pc 0x00000000000bd7a4  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#13  pc 0x00000000000c2470  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#14  pc 0x00000000000c18dc  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#15  pc 0x0000000000152048  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#16  pc 0x0000000000151bac  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#17  pc 0x0000000000004300 
  dotnet/android#18  pc 0x000000000000b754 
  dotnet/android#19  pc 0x000000000000a4e8 
  dotnet/android#20  pc 0x0000000000009e64 
  dotnet/android#21  pc 0x000000000000991c 
  dotnet/android#22  pc 0x0000000000009b84 
  dotnet/android#23  pc 0x00000000000c65c8  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#24  pc 0x000000000025f2c4  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_runtime_try_invoke+148) (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#25  pc 0x00000000002624d0  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_runtime_try_invoke_handle+40) (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#26  pc 0x0000000000294d04  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#27  pc 0x0000000000294824  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#28  pc 0x00000000001fbb00  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_assembly_request_byname+1088) (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#29  pc 0x00000000001f956c  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#30  pc 0x000000000022b1b4  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#31  pc 0x0000000000008784 
  dotnet/android#32  pc 0x0000000000005820 
  dotnet/android#33  pc 0x000000000000ec20 
  dotnet/android#34  pc 0x000000000000e98c 
  dotnet/android#35  pc 0x000000000000e4e0 
  dotnet/android#36  pc 0x000000000000dc4c 
  dotnet/android#37  pc 0x000000000000d674 
  dotnet/android#38  pc 0x000000000000c348 
  dotnet/android#39  pc 0x000000000000c158 
  dotnet/android#40  pc 0x0000000000006d44 
  dotnet/android#41  pc 0x000000000000a878 
  dotnet/android#42  pc 0x0000000000007040 
  dotnet/android#43  pc 0x000000000000ca3c 
  dotnet/android#44  pc 0x000000000000c740 
  dotnet/android#45  pc 0x000000000001bc90 
  dotnet/android#46  pc 0x000000000000bc98 
  dotnet/android#47  pc 0x0000000000017798 
  dotnet/android#48  pc 0x000000000000fb4c 
  dotnet/android#49  pc 0x000000000000fb48 
  dotnet/android#50  pc 0x000000000000f3c4 
  dotnet/android#51  pc 0x0000000000038fe0 
  dotnet/android#52  pc 0x00000000000061d4 
  dotnet/android#53  pc 0x0000000000005ef4 
  dotnet/android#54  pc 0x000000000000612c 
  dotnet/android#55  pc 0x00000000000056c4 
  dotnet/android#56  pc 0x000000000000526c 
  dotnet/android#57  pc 0x000000000000f1a4 
  dotnet/android#58  pc 0x00000000000061b8 
  dotnet/android#59  pc 0x000000000000a7bc 
  dotnet/android#60  pc 0x00000000000061e4 
  dotnet/android#61  pc 0x0000000000005ef4 
  dotnet/android#62  pc 0x000000000000612c 
  dotnet/android#63  pc 0x00000000000056c4 
  dotnet/android#64  pc 0x000000000000526c 
  dotnet/android#65  pc 0x000000000000f1a4 
  dotnet/android#66  pc 0x00000000000061b8 
  dotnet/android#67  pc 0x00000000000061e4 
  dotnet/android#68  pc 0x0000000000005ef4 
  dotnet/android#69  pc 0x000000000000612c 
  dotnet/android#70  pc 0x00000000000056c4 
  dotnet/android#71  pc 0x000000000000526c 
  dotnet/android#72  pc 0x000000000000f1a4 
  dotnet/android#73  pc 0x00000000000061b8 
  dotnet/android#74  pc 0x00000000000061e4 
  dotnet/android#75  pc 0x0000000000005ef4 
  dotnet/android#76  pc 0x0000000000008da0 
  dotnet/android#77  pc 0x000000000000612c 
  dotnet/android#78  pc 0x00000000000056c4 
  dotnet/android#79  pc 0x000000000000526c 
  dotnet/android#80  pc 0x000000000000f1a4 
  dotnet/android#81  pc 0x00000000000061b8 
  dotnet/android#82  pc 0x000000000000b1fc 

Additional information:

  • affects the Android app only when foregrounded
  • affects all Android OS versions supported by this app (10 - 15 beta)
  • affects Google, Samsung, and other manufacturers

@sunilsolanki-alight
Copy link
Author

Is there any updates on the issue?

@sunilsolanki-alight
Copy link
Author

Its very frustrating, issue only occur on production release build, and from crash logs no clue of code error. We can't provide any reproducing steps.

@grendello
Copy link
Contributor

@sunilsolanki-alight @alexanderdibenedetto can you upload here libmonosgen-2.0.so (for the arm64 architecture) from your respective applications? It would allow us to symbolize the traces to at least see where the issue occurs.

Also, please try with NET9 rc2 if you can (I understand Google Play Console allows for this kind of A/B testing/beta testing), to see whether the bug still exists there.

@mnxamdev
Copy link

We are having this exact issue on our Android release to Play Store with MAUI 8.0.82. We don't know how to reproduce it. Please fix.

@alexanderdibenedetto
Copy link

@grendello please see the uploaded zip file containing this library.
libmonosgen-2.0.so.zip

@fabEps
Copy link

fabEps commented Nov 7, 2024

Same issue here, reported in the PlayStore:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 30178 >>> de.abc.members_app <<<

backtrace:
  #00  pc 0x00000000000d77a4  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#1  pc 0x00000000000ca444  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#2  pc 0x00000000000ec024  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#3  pc 0x00000000000bb2f8  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#4  pc 0x00000000000bd934  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#5  pc 0x00000000000c264c  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#6  pc 0x00000000000c1a6c  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#7  pc 0x0000000000152278  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#8  pc 0x0000000000151ddc  /data/app/~~y6f1LqRn_43bgGP2uHAJpA==/de.abc.members_app-NO1P3uSWvR8hhAR80SX-sg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#9  pc 0x0000000000004300 

Device: Galaxy S22 Ultra with Android 14 (SDK 34)

@raf10
Copy link

raf10 commented Nov 11, 2024


Hi I've the some issue in play console
App installs, but doesn't load

backtrace:
#00 pc 0x0000000000213604 /data/app/~~bSUYoEYCMIIOhZ9QKUrHFA==/com.armsoft.trade-acIQop6lVOXfUPO0f-WEAQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
dotnet/android#1 pc 0x0000000000222fa8 /data/app/~~bSUYoEYCMIIOhZ9QKUrHFA==/com.armsoft.trade-acIQop6lVOXfUPO0f-WEAQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
dotnet/android#2 pc 0x000000000022b0fc /data/app/~~bSUYoEYCMIIOhZ9QKUrHFA==/com.armsoft.trade-acIQop6lVOXfUPO0f-WEAQ==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: eb24a52f2dd44e052b62836d7c0d12115d335fb9)
dotnet/android#3 pc 0x000000000000816c

What to do?

@jukkaasikainen
Copy link

This issue causes most of our production issues currently according to Google Play:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 22656 >>> com.company.id <<<

backtrace:
  #00  pc 0x000000000021373c  /data/app/~~3MInwfjSAnz34oKtkWvfjQ==/com.company.id-kkCmfzLUamn5bTXbvGlPrA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#1  pc 0x00000000002230e0  /data/app/~~3MInwfjSAnz34oKtkWvfjQ==/com.company.id-kkCmfzLUamn5bTXbvGlPrA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#2  pc 0x000000000022b234  /data/app/~~3MInwfjSAnz34oKtkWvfjQ==/com.company.id-kkCmfzLUamn5bTXbvGlPrA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
  dotnet/android#3  pc 0x000000000001a2ac 

@grendello
Copy link
Contributor

@grendello please see the uploaded zip file containing this library. libmonosgen-2.0.so.zip

Thanks, symbolication of the trace you provided in #109921 is as follows:

0xd75cc
mono_method_to_ir
/__w/1/s/src/mono/mono/mini/method-to-ir.c:9914

0xca26c
inline_method
/__w/1/s/src/mono/mono/mini/method-to-ir.c:0

0xebe4c
handle_ctor_call
/__w/1/s/src/mono/mono/mini/method-to-ir.c:5807
mono_method_to_ir
/__w/1/s/src/mono/mono/mini/method-to-ir.c:9364

0xbb168
mono_compile_create_vars
/__w/1/s/src/mono/mono/mini/mini.c:1927
mini_method_compile
/__w/1/s/src/mono/mono/mini/mini.c:3492

0xbd7a4
mini_class_has_reference_variant_generic_argument
/__w/1/s/src/mono/mono/mini/mini.c:4040

0xc2470
compile_special
/__w/1/s/src/mono/mono/mini/mini-runtime.c:0
mono_jit_compile_method_with_opt
/__w/1/s/src/mono/mono/mini/mini-runtime.c:2778
jit_compile_method_with_opt_cb
/__w/1/s/src/mono/mono/mini/mini-runtime.c:2868
jit_compile_method_with_opt
/__w/1/s/src/mono/mono/mini/mini-runtime.c:2884

0xc18dc
fwrite(void const*, unsigned long pass_object_size0, unsigned long, __sFILE*)
/usr/local/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/bits/fortify/stdio.h:125
mono_emit_jit_dump
/__w/1/s/src/mono/mono/mini/mini-runtime.c:2219

0x152048
common_call_trampoline
/__w/1/s/src/mono/mono/mini/mini-trampolines.c:0

0x151bac
mini_add_method_trampoline
/__w/1/s/src/mono/mono/mini/mini-trampolines.c:423

This looks like a JIT issue with some generic class, if other people provide their copy of libmonosgen-2.0.so, we would be able to see if the traces generally match.

@steveisok can you take a look and route appropriately?

@grendello grendello assigned steveisok and unassigned grendello Nov 18, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 18, 2024
@akoeplinger akoeplinger transferred this issue from dotnet/android Nov 18, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 18, 2024
@matouskozak matouskozak added os-android area-Codegen-JIT-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 18, 2024
Copy link
Contributor

Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to this area: @steveisok, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@kg
Copy link
Member

kg commented Nov 18, 2024

Not to pile on, but I also see this issue in the Google Play Console for a production .NET MAUI Android application. Here are some additional details I see there from Google Play:

[split_config.arm64_v8a.apk!libmonosgen-2.0.so] SIGSEGV

Problem This issue includes GWP-ASan stack traces. These stack traces provide additional information for debugging. Recommendation Some stack traces below include additional details about memory allocation. They may help debug this issue.

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 21357 >>> com.******.app <<<

backtrace:
  #00  pc 0x00000000000d75cc  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
  dotnet/android#1  pc 0x00000000000ca26c  /data/app/~~ro-aanPmvChnEGfYdE_A-w==/com.******.app-TtQeBmv5rm4QixhQ0dzHVw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 943992f94e0687d44fe2a2fc0648c7cc473eee93)
~snip~

Hi,
Can you let me know which specific version of .NET you used to build this so I can match it with the source code for that version? Thank you!

@grendello
Copy link
Contributor

@kg libmonosgen-2.0.so attached above says 8.0.824.36612 @Commit: 08338fcaa5c9b9a8190abb99222fed12aaba956c

@kg
Copy link
Member

kg commented Nov 18, 2024

The stack trace in this case suggests heap corruption, specifically of field and/or method metadata. The asan stacktrace (thank you very much for providing it!) also suggests this. Are your application(s) making much use of pinvoke, JNI, etc? Calling into any third-party native libraries?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-JIT-mono os-android untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests