Failed test: System.Diagnostics.Tests.EventLogWriteEntryTests.WriteWithoutExistingSource
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- operating-systems, testing-qa
Research direction
Start with System.Diagnostics.EventLog/tests/EventLogTests/EventLogWriteEntryTests.cs, especially WriteWithoutExistingSource around line 392 and WriteEventMessageValues_OutOfRange around line 378. Trace the failure through Common/src/System/Diagnostics/NetFrameworkUtils.cs and System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs, then run the affected Windows tests; done means both tests pass without UnauthorizedAccessException.
Written by the indexing model from the issue text.
Description
Failed in: runtime-coreclr libraries-pgo/20250824.1
Failed tests:
net10.0-windows-Release-x86-jitosr_stress-Windows.10.Amd64.Open
- System.Diagnostics.Tests.EventLogWriteEntryTests.WriteWithoutExistingSource
- System.Diagnostics.Tests.EventLogWriteEntryTests.WriteEventMessageValues_OutOfRange
Error message:
Starting: System.Diagnostics.EventLog.Tests (parallel test collections = on [4 threads], stop on fail = off)
System.Diagnostics.Tests.EventLogWriteEntryTests.WriteWithoutExistingSource [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/Common/src/System/Diagnostics/NetFrameworkUtils.cs(32,0): at System.Diagnostics.NetFrameworkUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex)
/_/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs(19,0): at System.Diagnostics.NetFrameworkUtils.EnterMutex(String name, Mutex& mutex)
/_/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs(446,0): at System.Diagnostics.EventLog.DeleteEventSource(String source, String machineName)
/_/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs(433,0): at System.Diagnostics.EventLog.DeleteEventSource(String source)
/_/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogWriteEntryTests.cs(392,0): at System.Diagnostics.Tests.EventLogWriteEntryTests.WriteWithoutExistingSource()
/_/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)
System.Diagnostics.Tests.EventLogWriteEntryTests.WriteEventMessageValues_OutOfRange [FAIL]
System.AggregateException : One or more errors occurred. (Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.ArgumentException)
Actual: typeof(System.UnauthorizedAccessException)) (Assert.Throws() Failure: Exception type was not an exact match
...
Stack Trace:
/_/src/libraries/Common/tests/TestUtilities/System/RetryHelper.cs(54,0): at System.RetryHelper.Execute(Action test, Int32 maxAttempts, Func`2 backoffFunc, Predicate`1 retryWhen, String testName)
/_/src/libraries/System.Diagnostics.EventLog/tests/Helpers.cs(40,0): at System.Diagnostics.Tests.Helpers.Retry[T](Func`1 func)
/_/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogWriteEntryTests.cs(378,0): at System.Diagnostics.Tests.EventLogWriteEntryTests.WriteEventMessageValues_OutOfRange()
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)
/_/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/RuntimeMethodInfo.cs(126,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
----- Inner Stack Trace #1 (Xunit.Sdk.ThrowsException) -----
/_/src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogWriteEntryTests.cs(378,0): at System.Diagnostics.Tests.EventLogWriteEntryTests.<>c__DisplayClass19_0.<WriteEventMessageValues_OutOfRange>b__0()
/_/src/libraries/System.Diagnostics.EventLog/tests/Helpers.cs(42,0): at System.Diagnostics.Tests.Helpers.<>c__DisplayClass10_0`1.<Retry>b__0()
/_/src/libraries/Common/tests/TestUtilities/System/RetryHelper.cs(45,0): at System.RetryHelper.Execute(Action test, Int32 maxAttempts, Func`2 backoffFunc, Predicate`1 retryWhen, String testName)
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·