runtime icon indicating copy to clipboard operation
runtime copied to clipboard

System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_GetCounters Failed

Open jkoritzinsky opened this issue 1 year ago • 3 comments

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=887390 Build error leg or test failing: System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_GetCounters Pull request: https://github.com/dotnet/runtime/pull/110378

Error Message

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

{
  "ErrorMessage": "System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_GetCounters [FAIL]",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=887390 Error message validated: [System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_GetCounters [FAIL]] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 12/5/2024 9:35:22 PM UTC

Report

Build Definition Test Pull Request
2718778 dotnet-runtime System.Diagnostics.Tests.CounterSampleCalculatorTests.CounterSampleCalculator_ElapsedTime
1053350 dotnet/runtime System.Diagnostics.Tests.PerformanceCounterTests.PerformanceCounter_Decrement dotnet/runtime#115802
1052836 dotnet/runtime System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_Create_Obsolete_CCD dotnet/runtime#116010
1051710 dotnet/runtime System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_Create_Obsolete_CCD dotnet/runtime#115766
2716788 dotnet-runtime System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_InstanceExists_Static
2714395 dotnet-runtime System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_DeleteCategory_Invalid
1046763 dotnet/runtime System.Diagnostics.Tests.PerformanceCounterTests.PerformanceCounter_Increment_IncrementReadOnly dotnet/runtime#115583
1044967 dotnet/runtime System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_CategoryType_SingleInstance

Summary

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

jkoritzinsky avatar Dec 05 '24 21:12 jkoritzinsky

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

removing blocking-clean-ci as this issue has not been hit in 30 days

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

jeffschwMSFT avatar Jan 22 '25 18:01 jeffschwMSFT

System.UnauthorizedAccessException : Attempted to perform an unauthorized operation.



Stack trace
   at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl) in /_/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Win32.cs:line 308
   at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext) in /_/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs:line 263
   at System.Security.AccessControl.NativeObjectSecurity.Persist(SafeHandle handle, AccessControlSections includeSections, Object exceptionContext) in /_/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs:line 368
   at System.Security.AccessControl.NativeObjectSecurity.Persist(SafeHandle handle, AccessControlSections includeSections) in /_/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs:line 361
   at System.Security.AccessControl.MutexSecurity.Persist(SafeWaitHandle handle) in /_/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/MutexSecurity.cs:line 178
   at System.Threading.ThreadingAclExtensions.SetAccessControl(Mutex mutex, MutexSecurity mutexSecurity) in /_/src/libraries/System.Threading.AccessControl/src/System/Threading/ThreadingAclExtensions.cs:line 35
   at System.Diagnostics.NetFrameworkUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex) in /_/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs:line 32
   at System.Diagnostics.NetFrameworkUtils.EnterMutex(String name, Mutex& mutex) in /_/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs:line 20
   at System.Diagnostics.PerformanceCounterCategory.Create(String categoryName, String categoryHelp, PerformanceCounterCategoryType categoryType, CounterCreationDataCollection counterData) in /_/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs:line 222
   at System.Diagnostics.PerformanceCounterCategory.Create(String categoryName, String categoryHelp, PerformanceCounterCategoryType categoryType, String counterName, String counterHelp) in /_/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs:line 192
   at System.Diagnostics.Tests.Helpers.CreateCategory(String categoryName, String counterName, PerformanceCounterCategoryType categoryType) in /_/src/libraries/System.Diagnostics.PerformanceCounter/tests/Helpers.cs:line 33
   at System.Diagnostics.Tests.Helpers.CreateCategory(String categoryName, PerformanceCounterCategoryType categoryType) in /_/src/libraries/System.Diagnostics.PerformanceCounter/tests/Helpers.cs:line 23
   at System.Diagnostics.Tests.PerformanceCounterCategoryTests.PerformanceCounterCategory_CategoryType_MultiInstance() in /_/src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceCounterCategoryTests.cs:line 85
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 126

Introduced with https://github.com/dotnet/runtime/commit/81f1f5ef694b62d801291fb70d86dd5ed9074448. Perhaps this thread isn't the one to create the mutex and cannot modify the ACL?

ericstj avatar Jul 14 '25 18:07 ericstj