-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[mono] MAUI release mode crash Assertion at /__w/1/s/src/mono/mono/mini/aot-runtime.c:5220, condition `plt_entry' not met #95406
Comments
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionRandom crash at the assertion in release mode, no problem for debug mode Reproduction StepsNo repro, only happened in release mode Expected behaviorshould not crash Actual behaviorcrash Regression?works in dotnet 7 Known WorkaroundsNo response Configuration
Other informationNo response
|
hi @jeffgoku thanks for the bug report. Do you have a sample app that demonstrates the issue that you could share with us? |
This issue has been marked |
This is probably some profiled AOT issue. I think MAUI ships an AOT profile for android that is used by default on Android /cc @jonathanpeppers |
@jeffgoku If you want to try, you can "AOT everything" by setting It's worth checking if that fixes it. |
Sorry I dont have a sample app, I think it will crash after allocate enough memory to trigger a GC |
@jonathanpeppers Thanks, I will give it a try some later time. |
@jeffgoku @jonathanpeppers Stumbled upon this, hitting the same issue. Setting AndroidEnableProfiledAot to 'false' seems to have fixed the issue. What is the next move here, is this workaround acceptable? Otherwise, I could use some time to create a small sample. |
If someone could share a In the past, the only case I've seen If you are OK with the app size increase, turning off |
Could be related: ppy/osu#24500 (comment) |
Just caught this one:
Bits from project file
Works fine without EnableLLVM. |
@jeffgoku Try enabling the trim operation for the debugging mode too ... this might help u find the problem I hope this might help |
Enabling trimming for debug didn't change much for me, At the same time, I can confirm that the combination of
runs okay on
randomly crashes with |
Can confirm setting AndroidEnableProfiledAot=false stops crashing of my release app caused by "aot-runtime.c:5220, condition `plt_entry' not met", but the APK is now 63mb, twice the size when I don't have that value set to false (and 3x the size of the Xamarin forms APK version the project was migrated from), the compile time on a core i9 is through the roof. |
@jonathanpeppers Is the default MAUI-shipped Android AOT profile at cause here? I don't mind the extra AOT time and space requirements but I am simply curious. Also I vaguely remember that creating your own AOT profile in .NET Android was not possible, yet? |
There are some known issues mixing: <AndroidEnableProfiledAot>True</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM> The reason being when we record an AOT profile (recorded under JIT), some of the wrong code paths are taken for checks like But this combination should work: <AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM> Or this one: <!-- Note this is the default if you left these blank -->
<AndroidEnableProfiledAot>True</AndroidEnableProfiledAot>
<EnableLLVM>False</EnableLLVM> You can record your own profile with this NuGet package, but it wouldn't solve this issue: |
Thanks - rebuilt with the last setting you mention setting and the APK is back to the regular maui APK size and doesn't crash. |
I too experience this issue. If one was to choose between
and
I believe AndroidEnableProfiledAot=True is important if app-size is an issue, but the best performance on runtime will be with AndroidEnableProfiledAot=False and EnableLLVM=True. Is that generally correct? |
If anyone is still looking for a repro of this issue then my ImageSharpMAUITest (as of commit In the csproj I have <PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Release'">
<EnableLLVM>true</EnableLLVM>
<RunAOTCompilation>true</RunAOTCompilation>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
</PropertyGroup> which runs fine. Removing
I did some different things of using different combinations of The TLDR is, <EnableLLVM>false</EnableLLVM>
<AndroidEnableProfiledAot>true</AndroidEnableProfiledAot> Having this setup appears to be the same of just deleting the 2 lines. <EnableLLVM>true</EnableLLVM>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot> Will give more performance, but at a larger filesize. <RunAOTCompilation>true</RunAOTCompilation> May be implied by |
Description
Random crash at the assertion in release mode, no problem for debug mode
Reproduction Steps
No repro, only happened in release mode
Expected behavior
should not crash
Actual behavior
crash
Regression?
works in dotnet 7
Known Workarounds
No response
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: