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

Generating methods.txt appears to stop writing to disk and is truncated #9693

Open
beeradmoore opened this issue Jan 20, 2025 · 0 comments
Open
Assignees
Labels
Area: Mono Runtime Mono-related issues: BCL bugs, AOT issues, etc.

Comments

@beeradmoore
Copy link

Android framework version

net9.0-android

Affected platform version

.NET 9.0.101

Description

While trying to setup monitoring of startup performance of our new MAUI app I wanted to monitor JIT time of our old XF app and our new MAUI app.

While trying to generate methods.txt I am getting odd output. The end of the file appears truncated. When it isn't truncated I am unsure if it is written to disk correctly or if it is truncated at the end of a line.

From the steps below the end of my log looks like

JIT method  begin: Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer:OnFlyoutViewLayoutChanging () elapsed: 1s:270::559345
JIT method   done: Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer:OnFlyoutViewLayoutChanging () elapsed: 1s:270::569033
JIT method  begin: Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer:UpdateFooterLayout () elapsed: 1s:270::636793
JIT method   done: Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutTemplatedContentRenderer:UpdateFooterLayout () elapsed: 1s:270::647887
JIT method  begin: Android.Runtime.JNINativeWrapper:Wrap_JniMarshal_PPLLJ_Z (_JniMarshal_PPLLJ_Z,intptr,intptr,intptr,intptr,long) elapsed: 1s:273::935960
JIT method

Here is the full log,

methods.txt

Steps to Reproduce

  1. Create new .NET 9 MAUI application
  2. Add android:debuggable="true" to AndroidManifest.xml
  3. Update nugets to ensure latest version of MAUI
  4. Setup debug.mono.log to be timing as per jit-timers
  5. Build, deploy, and run app in release mode (dotnet publish -t:Run -f net9.0-android)
  6. Wait about 10 seconds
  7. Get methods.txt, adb shell run-as com.companyname.mauiapp10 cat files/.__override__/arm64-v8a/methods.txt > methods.txt
  8. Edit file and observe its end

Did you find any workaround?

Nope. Deleting the file adb shell run-as com.companyname.mauiapp10 rm files/.__override__/arm64-v8a/methods.txt and re-running it will sometimes give a different line end.

Relevant log output

@beeradmoore beeradmoore added the needs-triage Issues that need to be assigned. label Jan 20, 2025
@jpobst jpobst added Area: Mono Runtime Mono-related issues: BCL bugs, AOT issues, etc. and removed needs-triage Issues that need to be assigned. labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Mono Runtime Mono-related issues: BCL bugs, AOT issues, etc.
Projects
None yet
Development

No branches or pull requests

5 participants