runtime: Android app crashes with error split_config.arm64_v8a.apk!libmonosgen-2.0.so
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
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 7
- Comments: 46 (20 by maintainers)
Commits related to this issue
- Fix init race in mono_class_try_get_[shortname]_class. We observed several crash reports in dotnet Android coming from google play store, like this one: https://github.com/dotnet/runtime/issues/1099... — committed to lateralusX/runtime by lateralusX 2 years ago
- Fix init race in mono_class_try_get_[shortname]_class. (#112282) We observed several crash reports in dotnet Android coming from google play store, like this one: https://github.com/dotnet/runtim... — committed to dotnet/runtime by lateralusX 2 years ago
- Fix init race in mono_class_try_get_[shortname]_class. We observed several crash reports in dotnet Android coming from google play store, like this one: https://github.com/dotnet/runtime/issues/1099... — committed to dotnet/runtime by lateralusX 2 years ago
- Fix init race in mono_class_try_get_[shortname]_class. We observed several crash reports in dotnet Android coming from google play store, like this one: https://github.com/dotnet/runtime/issues/1099... — committed to dotnet/runtime by lateralusX 2 years ago
- Fix init race in mono_class_try_get_[shortname]_class. (#112296) Backport of #112282 to release/9.0 We observed several crash reports in dotnet Android coming from google play store, like this on... — committed to dotnet/runtime by github-actions[bot] 2 years ago
- Fix init race in mono_class_try_get_[shortname]_class. (#112297) Backport of #112282 to release/8.0 We observed several crash reports in dotnet Android coming from google play store, like this on... — committed to dotnet/runtime by github-actions[bot] 2 years ago
Will this be fixed by https://github.com/dotnet/runtime/issues/106410#issuecomment-2854575035 ? Sorry, but this is getting really critical now:
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.
@grendello thanks, I didn’t know you have to have *.so library locally and then ask dotnet-symbol to provide symbols.
Here is how I was able to symbolize in an easier way (because you just give it the whole stack trace, you can give it a few stack traces at a time too) than to use llvm-addr2line (I compared ndk-stack result to llvm-addr2line and they both are the same except that ndk-stack gives not only line number but also character number).
To install, powershell asked me to move -g to the end
dotnet tool -g install dotnet-symbollike thisdotnet tool install dotnet-symbol -gThen I pulled out libmonosgen-2.0.so by unzipping *.aab that was sent to prod where the crash happened. Having that I can get symbols
dotnet-symbol libmonosgen-2.0.solibmonosgen-2.0.so is not just a name as it turned out but a path to the *.so library from *.aab of that particular build that was sent to prod (I suppose that is for the dotnet-symbol to get the version of the library) The result of this was a file “libmonosgen-2.0.so.dbg”Then I use
ndk-stackCreated a text file with a stacktrace (example of how stack looks like is in my comment above - don’t forget the asterisks at the beginning of each. Text file can have a few stacktraces). Placedlibmonosgen-2.0.so.dbghere as well and ran the commandndk-stack -sym ./ -i stacktrace.txt./is because I havelibmonosgen-2.0.so.dbgat the same directory. if it was somewhere else it would be a path to that folder.Here are symbolized stack traces of those that I posted above
To symbolicate the trace, you will need:
dotnet tool -g install dotnet-symbol)llvm-addr2lineutilityAfter the above are available, follow these steps:
libmonosgen-2.0.so) run:dotnet-symbol library-name.sopccolumn in the trace, prefix0xis optional, as are all the leading zeros) and the library name and run:llvm-addr2line -aCifp -e library-name.so frame_addressFor instance, for the trace line:
#00 pc 0x00000000000d77a4 /data/app/~~9Zfo4zOl7WqWCiDvRydiaQ==/com.example.app-enZujLkwQVZO0lw0cRXUvA==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: 67228244379e0d7698287264cbddfcea8c1e1cb3)We’d run:
Can you please guide on how did you get this symbolic trace from .so file?
@kg
libmonosgen-2.0.soattached above says8.0.824.36612 @Commit: 08338fcaa5c9b9a8190abb99222fed12aaba956cNot 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.
Additional information: