dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

[Android] Android x86 emulator failures in System.Diagnostics.DiagnosticSource runtime metrics #105203

Closed matouskozak closed 1 month ago

matouskozak commented 1 month ago

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=748618 Build error leg or test failing: System.Diagnostics.DiagnosticSource.Tests Affected CI: android_x86_release_allsubsets_mono (runtime-extra-platforms)

Stack trace example:

07-20 10:08:58.329 16840 16860 I DOTNET  : 1)   [FAIL] System.Diagnostics.Metrics.Tests.RuntimeMetricsTests.GcCollectionsCount   Test name: System.Diagnostics.Metrics.Tests.RuntimeMetricsTests.GcCollectionsCount
07-20 10:08:58.329 16840 16860 I DOTNET  :    Assembly:  [System.Diagnostics.DiagnosticSource.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
07-20 10:08:58.329 16840 16860 I DOTNET  :    Exception messages: Expected to find a measurement for 'gen0'.   Exception stack traces:    at System.Diagnostics.Metrics.Tests.RuntimeMetricsTests.GcCollectionsCount() in /_/src/libraries/System.Diagnostics.DiagnosticSource/tests/RuntimeMetricsTests.cs:line 111
07-20 10:08:58.329 16840 16860 I DOTNET  :    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
07-20 10:08:58.329 16840 16860 I DOTNET  :    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "Expected to find a measurement for 'gen0'",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=748618 Error message validated: [Expected to find a measurement for 'gen0'] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 7/21/2024 4:49:54 PM UTC

Report

Build Definition Test Pull Request
758343 dotnet/runtime System.Diagnostics.Metrics.Tests.RuntimeMetricsTests.GcCollectionsCount
748618 dotnet/runtime System.Diagnostics.Metrics.Tests.RuntimeMetricsTests.GcCollectionsCount

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 2
dotnet-policy-service[bot] commented 1 month ago

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

matouskozak commented 1 month ago

Similar to https://github.com/dotnet/runtime/issues/105202, likely related to the new tests introduced in https://github.com/dotnet/runtime/pull/104680, affecting only x86 Android emulator at the moment. Do you know if these tests should be disabled or same changes are needed for them to work on x86 Android emulators? @stevejgordon @tarekgh ?

Edit. Looks like the failure is not 100% reproducible since I've seen only two failures on rolling-builds from 2024/07/20 so far.

stevejgordon commented 1 month ago

@matouskozak I'd say it's best and safe to disable these on the affected platforms.

matouskozak commented 1 month ago

@matouskozak I'd say it's best and safe to disable these on the affected platforms.

Thank you @stevejgordon, is the same approach the best for https://github.com/dotnet/runtime/issues/105202 as well?