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

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

Closed
ViktorHofer opened this issue Dec 16, 2022 · 2 comments · Fixed by #80478
Assignees
Labels
area-System.Diagnostics.Metric bug disabled-test The test is disabled in source code against the issue test-run-desktop Test failures in .NET Framework "Desktop" test runs (running CoreFX test assets)
Milestone

Comments

@ViktorHofer
Copy link
Member

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

@ViktorHofer ViktorHofer added bug test-run-desktop Test failures in .NET Framework "Desktop" test runs (running CoreFX test assets) area-System.Diagnostics.Metric labels Dec 16, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Dec 16, 2022
@ViktorHofer
Copy link
Member Author

cc @tommcdon @noahfalk

@tommcdon
Copy link
Member

@tarekgh

@tommcdon tommcdon added this to the 8.0.0 milestone Dec 16, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Dec 16, 2022
@akoeplinger akoeplinger added the disabled-test The test is disabled in source code against the issue label Dec 22, 2022
akoeplinger added a commit to akoeplinger/runtime that referenced this issue Dec 22, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 11, 2023
noahfalk added a commit to noahfalk/runtime that referenced this issue Jan 11, 2023
None of our assemblies support partial trust usage any longer. Removing
the APTCA attribute from S.D.DS so that it follows the pattern.

Fixes dotnet#79749
jkotas pushed a commit that referenced this issue Jan 13, 2023
* Remove APTCA

None of our assemblies support partial trust usage any longer. Removing
the APTCA attribute from S.D.DS so that it follows the pattern.

Fixes #79749

* Remove more code for partial trust
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 13, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics.Metric bug disabled-test The test is disabled in source code against the issue test-run-desktop Test failures in .NET Framework "Desktop" test runs (running CoreFX test assets)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants