Skip to content

System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourceFiltersInstruments failing in CI (Outerloop) #79749

Closed

Description

@ViktorHofer

Configuration: net48-windows-Release-x86-Windows.10.Amd64.Client21H1.Open

Unexpected Error event: System.MethodAccessException: Attempt by security transparent method 'System.Diagnostics.Metrics.MetricsEventSource+MetricSpec.Parse(System.String)' to access security critical method 'System.MemoryExtensions.AsSpan(System.String, Int32, Int32)' failed.

Assembly 'System.Diagnostics.DiagnosticSource, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model.  Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
at System.Diagnostics.Metrics.MetricsEventSource.MetricSpec.Parse(String text) in //src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/MetricsEventSource.cs:line 474
at System.Diagnostics.Metrics.MetricsEventSource.CommandHandler.ParseSpecs(String metricsSpecs) in //src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/MetricsEventSource.cs:line 393
at System.Diagnostics.Metrics.MetricsEventSource.CommandHandler.OnEventCommand(EventCommandEventArgs command) in /_/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/MetricsEventSource.cs:line 363
Expected: True
Actual:   False
  at System.Diagnostics.Metrics.Tests.MetricsEventListener.AssertOnError() in /_/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricEventSourceTests.cs:line 1144
   at System.Diagnostics.Metrics.Tests.MetricsEventListener.GetCountEvents(String eventName) in /_/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricEventSourceTests.cs:line 1153
   at System.Diagnostics.Metrics.Tests.MetricsEventListener.WaitForEvent(TimeSpan timeout, Int32 numEvents, String eventName) in /_/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricEventSourceTests.cs:line 1117
   at System.Diagnostics.Metrics.Tests.MetricEventSourceTests.EventSourceFiltersInstruments() in /_/src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricEventSourceTests.cs:line 272

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

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Dec 16, 2022
  2. ViktorHofer commented on Dec 16, 2022

    @ViktorHofer
    MemberAuthor
  3. tommcdon commented on Dec 16, 2022

    @tommcdon
    Member
  4. added this to the 8.0.0 milestone on Dec 16, 2022
  5. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Dec 16, 2022
  6. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jan 11, 2023
  7. added a commit that references this issue on Jan 11, 2023
    080ca72
  8. added a commit that references this issue on Jan 13, 2023
    58df150
  9. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jan 13, 2023
  10. ghost locked as resolved and limited conversation to collaborators on Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Diagnostics.Metricbugdisabled-testThe test is disabled in source code against the issuetest-run-desktopTest failures in .NET Framework "Desktop" test runs (running CoreFX test assets)

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions