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

[TestFailure] System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes #85290

Closed
rzikm opened this issue Apr 25, 2023 · 8 comments · Fixed by #86286
Assignees
Labels
area-System.Diagnostics.Metric blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@rzikm
Copy link
Member

rzikm commented Apr 25, 2023

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=250208
Build error leg or test failing: System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
Pull request: #84976

Error Message

Fill the error message using known issues guidance.

configuration: net48-windows-Release-x86-Windows.10.Amd64.Client.Open

{
  "ErrorMessage": "Assert.Equal() Failure\r\n                        \u2193 (pos 14)\r\nExpected: 175308643975310.8\r\nActual:   175308643975311\r\n                        \u2191 (pos 14)",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}
Assert.Equal() Failure
                        ↓ (pos 14)
Expected: 175308643975310.8
Actual:   175308643975311
                        ↑ (pos 14)

Report

Build Definition Test Pull Request
273616 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
273626 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
273613 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
273607 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
273197 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
273209 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
273192 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
273191 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
272720 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
272715 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
272725 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
272713 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
271601 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
271580 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
271596 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
271578 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
270262 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
270268 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
270266 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
270253 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
268810 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
268804 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
268788 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
268799 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
267083 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
267087 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
267078 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
267096 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265601 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265613 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265599 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265597 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265076 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265074 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265069 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
265067 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
264525 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
264520 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
264529 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
264521 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
263425 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
263426 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
263424 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
263420 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
262068 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
262067 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
262058 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
262051 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
260630 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
260624 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
260634 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
260633 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
259071 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
259058 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
259070 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
259051 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257915 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257900 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257897 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257903 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257408 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257389 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257403 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257399 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257044 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257045 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257040 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
257024 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
255861 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
255854 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
255846 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
255856 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
254410 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
254406 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
254400 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
254395 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
253026 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
253024 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
253030 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
253014 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
251307 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
251291 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
250208 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes #84976
249837 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes
249824 dotnet/runtime System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
4 28 85
@rzikm rzikm added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Apr 25, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 25, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Apr 25, 2023
@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 26, 2023
@tommcdon
Copy link
Member

@tarekgh

@tommcdon tommcdon added this to the 8.0.0 milestone Apr 26, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Apr 26, 2023
@tommcdon tommcdon assigned tommcdon and tarekgh and unassigned tommcdon Apr 26, 2023
@tarekgh
Copy link
Member

tarekgh commented Apr 26, 2023

@noahfalk will be the best to look at this one if possible.

@tarekgh
Copy link
Member

tarekgh commented Apr 26, 2023

@noahfalk this looks a double rounding issue on x86.

https://dev.azure.com/dnceng-public/public/_build/results?buildId=250208&view=ms.vss-test-web.build-test-results-tab&runId=4844796&resultId=100200&paneView=debug

Assert.Equal() Failure
↓ (pos 14)
Expected: 175308643975310.8
Actual:   175308643975311
↑ (pos 14)

 at System.Diagnostics.Metrics.Tests.MetricEventSourceTests.AssertGenericCounterEventsPresent(String eventName, EventWrittenEventArgs[] events, String meterName, String instrumentName, String tags, String expectedUnit, ValueTuple`2[] expected) in /_/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricEventSourceTests.cs:line 974
   at System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourcePublishesAllDataTypes() in /_/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricEventSourceTests.cs:line 636

@noahfalk
Copy link
Member

noahfalk commented Apr 26, 2023

@tarekgh - From the perspective of the Metrics tests I'm unconcerned and we could certainly update the test to tolerate the rounding behavior.

@tannergooding @AndyAyersMS - Just a heads up in case you believe the apparent change in rounding behavior was unintentional? When you trim away all the other stuff the test is doing I think the underlying math looks like:

double d;
d += 87_654_321_987_654.4;
d += 87_654_321_987_654.4;
string s = d.ToString();
Assert.Equal("175308643975310.8", d);

EDIT: Nevermind, I missed that the behavior is on net48, not .NET Core. I'm guessing that makes it not as relevant for you.

@tarekgh tarekgh assigned noahfalk and unassigned tarekgh Apr 26, 2023
@noahfalk
Copy link
Member

For the changes that you linked @tarekgh I'm not sure what the connection is between behavior changes in 3.0 and test behavior changes that presumably happened recently?

@tarekgh
Copy link
Member

tarekgh commented Apr 26, 2023

The failure is on net48-windows-Release-x86-Windows and not on net core. The link I pasted shows the divergence in the floating point since net core 3.0. So, I expect we can run into differences when running on NETFX. I don't know why this started to show up though but I don't expect any change done in the NETFX can cause this failure.

@noahfalk
Copy link
Member

ah! I missed that net48 entirely, thanks!

noahfalk added a commit that referenced this issue May 16, 2023
Fixes #85290
Desktop .NET Framework on x86 improperly rounds double values in some circumstances. I switched the test to use a lower precision double value so that it is not impacted by the extra rounding.
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 16, 2023
noahfalk added a commit that referenced this issue May 16, 2023
…6286)

Fixes #85290
Desktop .NET Framework on x86 improperly rounds double values in some circumstances. I switched the test to use a lower precision double value so that it is not impacted by the extra rounding.
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics.Metric blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants