runtime icon indicating copy to clipboard operation
runtime copied to clipboard

System.Net.Http.Functional.Tests.TelemetryTest failing with differing string

Open tannergooding opened this issue 1 year ago • 8 comments

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=847502 Build error leg or test failing: EventSource_ExistsWithCorrectId

Error Message

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

{
  "ErrorMessage": ["Expected: \"System.Net.Http\"", "Actual:   \"HttpTelemetry\""],
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=847502 Error message validated: [Expected: "System.Net.Http" Actual: "HttpTelemetry"] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 10/18/2024 7:25:09 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

tannergooding avatar Oct 18 '24 19:10 tannergooding

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries See info in area-owners.md if you want to be subscribed.

Tagging subscribers to this area: @dotnet/ncl See info in area-owners.md if you want to be subscribed.

This failure on Browser is already tracked by https://github.com/dotnet/runtime/issues/71877. The test in question should already be disabled there: https://github.com/dotnet/runtime/blob/f87687aa595399e578e60940e5fccae37c5cc114/src/libraries/System.Net.Http/tests/FunctionalTests/TelemetryTest.cs#L24-L31

Does WasmTestOnChrome not fall under PlatformDetection.IsBrowser?

MihaZupan avatar Oct 21 '24 17:10 MihaZupan

Maybe on browser the env variable MONO_AOT_MODE is never set ?

pavelsavara avatar Oct 22 '24 14:10 pavelsavara

@ilonatommy this and https://github.com/dotnet/runtime/issues/105363 are getting hit a lot. please take a look

lewing avatar Oct 23 '24 17:10 lewing

Maybe on browser the env variable MONO_AOT_MODE is never set ?

The test is run with /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=false.

It's true that MONO_AOT_MODE is never set, because ENABLE_AOT is not defined. I guess it should be set here: https://github.com/dotnet/runtime/blob/edaa25e6942f3e8d9e2f078d99f34ed015658fbe/src/tasks/AotCompilerTask/MonoAOTCompiler.cs#L1140 The tests, however fail when AOT = false, so the active issue does not prevent it. We have a detection for EAT on wasm browser, it's this property: https://github.com/dotnet/runtime/blob/edaa25e6942f3e8d9e2f078d99f34ed015658fbe/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs#L288 set by this stub: https://github.com/dotnet/runtime/blob/edaa25e6942f3e8d9e2f078d99f34ed015658fbe/src/libraries/Common/tests/TestUtilities/ILLink.Substitutions.AggressiveTrimming.xml#L4 from here: https://github.com/dotnet/runtime/blob/edaa25e6942f3e8d9e2f078d99f34ed015658fbe/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj#L13

I will add appropriate blocking condition in a PR soon.

ilonatommy avatar Oct 24 '24 08:10 ilonatommy

About this part:

Maybe on browser the env variable MONO_AOT_MODE is never set ?

It's true that MONO_AOT_MODE is never set, because ENABLE_AOT is not defined.

I found where we're setting it: https://github.com/dotnet/runtime/blob/edaa25e6942f3e8d9e2f078d99f34ed015658fbe/src/mono/browser/build/BrowserWasmApp.targets#L319

that triggers: https://github.com/dotnet/runtime/blob/8e8143ec8754773fb2b34e5165ca92c2fdeb98ac/src/mono/browser/runtime/runtime.c#L308-L312

so the existing blocker is also fine.

ilonatommy avatar Oct 24 '24 09:10 ilonatommy

Browser does not support diagnostics, so in the current state it's expected to trim https://github.com/dotnet/runtime/blob/8e8143ec8754773fb2b34e5165ca92c2fdeb98ac/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.cs#L12

This can be enabled once we have EP working on WASM browser.

ilonatommy avatar Oct 24 '24 09:10 ilonatommy