Skip to content

System.UnauthorizedAccessException in System.Diagnostics.PerformanceCounter.Tests #117117

Open
@AndyAyersMS

Description

@AndyAyersMS

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1080767&view=ms.vss-test-web.build-test-results-tab

I have also seen this on x86:

https://dev.azure.com/dnceng-public/public/_build/results?buildId=1074980&view=ms.vss-test-web.build-test-results-tab

So far only under jit stress, but not sure that's a requirement.

  Discovering: System.Diagnostics.PerformanceCounter.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.PerformanceCounter.Tests (found 97 of 99 test cases)
  Starting:    System.Diagnostics.PerformanceCounter.Tests (parallel test collections = on [4 threads], stop on fail = off)

Info: Successfully installed performance counters in C:\h\w\B1D2097F\t\ldxp23z1.wdj\provider.man    System.Diagnostics.Tests.PerformanceDataTests.PerformanceCounter_PerformanceData [SKIP]
      Condition(s) not met: "IsRunnableEnvironment"

Info: Successfully uninstalled the performance counters from the counter definition XML file C:\h\w\B1D2097F\t\ldxp23z1.wdj\provider.man.    System.Diagnostics.Tests.PerformanceCounterTests.PerformanceCounter_Increment_IncrementReadOnly [FAIL]
      System.UnauthorizedAccessException : Attempted to perform an unauthorized operation.
      Stack Trace:
        /_/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Win32.cs(308,0): at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl)
        /_/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs(263,0): at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext)
        /_/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/MutexSecurity.cs(178,0): at System.Security.AccessControl.MutexSecurity.Persist(SafeWaitHandle handle)
        /_/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs(32,0): at System.Diagnostics.NetFrameworkUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex)
        /_/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs(376,0): at System.Diagnostics.PerformanceCounterCategory.Delete(String categoryName)
        /_/src/libraries/System.Diagnostics.PerformanceCounter/tests/Helpers.cs(56,0): at System.Diagnostics.Tests.Helpers.DeleteCategory(String categoryName)
        /_/src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceCounterTests.cs(270,0): at System.Diagnostics.Tests.PerformanceCounterTests.PerformanceCounter_Increment_IncrementReadOnly()
        /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs(36,0): at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions