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

[Apple] Microsoft-Diagnostics-DiagnosticSource EventSource not terminated properly #104881

Closed
matouskozak opened this issue Jul 15, 2024 · 12 comments · Fixed by #106337
Closed

[Apple] Microsoft-Diagnostics-DiagnosticSource EventSource not terminated properly #104881

matouskozak opened this issue Jul 15, 2024 · 12 comments · Fixed by #106337
Assignees
Labels
area-System.Diagnostics.Tracing blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' in-pr There is an active PR which will close this issue when it is merged Known Build Error Use this to report build issues in the .NET Helix tab os-ios Apple iOS os-maccatalyst MacCatalyst OS os-tvos Apple tvOS
Milestone

Comments

@matouskozak
Copy link
Member

matouskozak commented Jul 15, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=740287
Build error leg or test failing: System.Diagnostics.Tracing.Tests
Affected CI: [tvos/ios]simulator-x64 Release AllSubsets_Mono, maccatalyst-[arm64/x64] Release AllSubsets_Mono (runtime-extra-platforms)
Range of commits: ac0eeb0...74af205

Stack trace example:

[16:01:09] dbug: 2024-07-13 16:01:09.435877-0700 System.Diagnostics.Tracing.Tests[8288:75116] Failed tests:
[16:01:09] dbug: 2024-07-13 16:01:09.436167-0700 System.Diagnostics.Tracing.Tests[8288:75116] 1) 	[FAIL] BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources   Test name: BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources
[16:01:09] dbug: 2024-07-13 16:01:09.436313-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.436458-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.436616-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0056968
[16:01:09] dbug: 2024-07-13 16:01:09.436806-0700 System.Diagnostics.Tracing.Tests[8288:75116] 2) 	[FAIL] BasicEventSourceTests.TestsTraits.Test_EventSource_Traits_Dynamic   Test name: BasicEventSourceTests.TestsTraits.Test_EventSource_Traits_Dynamic
[16:01:09] dbug: 2024-07-13 16:01:09.436970-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.437072-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsTraits.Test_EventSource_Traits_Dynamic()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.437208-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0005719
[16:01:09] dbug: 2024-07-13 16:01:09.437438-0700 System.Diagnostics.Tracing.Tests[8288:75116] 3) 	[FAIL] BasicEventSourceTests.TestsTraits.Test_EventSource_Traits_Contract   Test name: BasicEventSourceTests.TestsTraits.Test_EventSource_Traits_Contract
[16:01:09] dbug: 2024-07-13 16:01:09.437537-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.437748-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsTraits.Test_EventSource_Traits_Contract()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.437914-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0012217
[16:01:09] dbug: 2024-07-13 16:01:09.438077-0700 System.Diagnostics.Tracing.Tests[8288:75116] 4) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller(setThrowOnEventWriteErrorsFlag: True)   Test case: BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller
[16:01:09] dbug: Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: 2024-07-13 16:01:09.438173-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: 2024-07-13 16:01:09.438262-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller(Boolean setThrowOnEventWriteErrorsFlag)
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.438356-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0132211
[16:01:09] dbug: 2024-07-13 16:01:09.438524-0700 System.Diagnostics.Tracing.Tests[8288:75116] 5) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller(setThrowOnEventWriteErrorsFlag: False)   Test case: BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller
[16:01:09] dbug: Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: 2024-07-13 16:01:09.438644-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: 2024-07-13 16:01:09.438754-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at BasicEventSourceTests.TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller(Boolean setThrowOnEventWriteErrorsFlag)
[16:01:09] dbug: 2024-07-13 16:01:09.438876-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Object.InvokeStub_TestsWriteEventToListener.Test_EventListenerThrows_ExceptionIsNotRethrownToCaller(Object , Span`1 )
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[16:01:09] dbug: Execution time: 0.0010019
[16:01:09] dbug: 2024-07-13 16:01:09.440033-0700 System.Diagnostics.Tracing.Tests[8288:75116] 6) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_EventSourceCreatedEvents_BeforeListener   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_EventSourceCreatedEvents_BeforeListener
[16:01:09] dbug: 2024-07-13 16:01:09.442315-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.444008-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWriteEventToListener.Test_EventSourceCreatedEvents_BeforeListener()
[16:01:09] dbug: 2024-07-13 16:01:09.445121-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.000466
[16:01:09] dbug: 2024-07-13 16:01:09.445306-0700 System.Diagnostics.Tracing.Tests[8288:75116] 7) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ArgsBasicTypes   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ArgsBasicTypes
[16:01:09] dbug: 2024-07-13 16:01:09.445419-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.445549-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ArgsBasicTypes()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.445675-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0020147
[16:01:09] dbug: 2024-07-13 16:01:09.445845-0700 System.Diagnostics.Tracing.Tests[8288:75116] 8) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_InvalidCalls   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_InvalidCalls
[16:01:09] dbug: 2024-07-13 16:01:09.446062-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.446203-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_InvalidCalls()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.446336-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0014665
[16:01:09] dbug: 2024-07-13 16:01:09.446531-0700 System.Diagnostics.Tracing.Tests[8288:75116] 9) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_EventSourceCreatedEvents_AfterListener   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_EventSourceCreatedEvents_AfterListener
[16:01:09] dbug: 2024-07-13 16:01:09.446803-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.446883-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWriteEventToListener.Test_EventSourceCreatedEvents_AfterListener()
[16:01:09] dbug: 2024-07-13 16:01:09.447168-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0004309
[16:01:09] dbug: 2024-07-13 16:01:09.447308-0700 System.Diagnostics.Tracing.Tests[8288:75116] 10) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ArgsCornerCases   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ArgsCornerCases
[16:01:09] dbug: 2024-07-13 16:01:09.447542-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.447698-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ArgsCornerCases()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.447828-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0005422
[16:01:09] dbug: 2024-07-13 16:01:09.448051-0700 System.Diagnostics.Tracing.Tests[8288:75116] 11) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ZeroKwds   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ZeroKwds
[16:01:09] dbug: 2024-07-13 16:01:09.448345-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.448573-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ZeroKwds()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.448778-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0005023
[16:01:09] dbug: 2024-07-13 16:01:09.449038-0700 System.Diagnostics.Tracing.Tests[8288:75116] 12) 	[FAIL] BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ToChannel_Coverage   Test name: BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ToChannel_Coverage
[16:01:09] dbug: 2024-07-13 16:01:09.449171-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.449330-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWriteEventToListener.Test_WriteEvent_ToChannel_Coverage()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.449478-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0010975
[16:01:09] dbug: 2024-07-13 16:01:09.449591-0700 System.Diagnostics.Tracing.Tests[8288:75116] 13) 	[FAIL] BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener   Test name: BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener
[16:01:09] dbug: 2024-07-13 16:01:09.449676-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.453784-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWrite.Test_Write_T(Listener listener)
[16:01:09] dbug: at BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.453890-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0013741
[16:01:09] dbug: 2024-07-13 16:01:09.454235-0700 System.Diagnostics.Tracing.Tests[8288:75116] 14) 	[FAIL] BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener_UseEvents   Test name: BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener_UseEvents
[16:01:09] dbug: 2024-07-13 16:01:09.454626-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.455014-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsWrite.Test_Write_T(Listener listener)
[16:01:09] dbug: at BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener_UseEvents()
[16:01:09] dbug: 2024-07-13 16:01:09.455317-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0003969
[16:01:09] dbug: 2024-07-13 16:01:09.455753-0700 System.Diagnostics.Tracing.Tests[8288:75116] 15) 	[FAIL] BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds   Test name: BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds
[16:01:09] dbug: 2024-07-13 16:01:09.455856-0700 System.Diagnostics.Tracing.Tests[8288:75116]    Assembly:  [System.Diagnostics.Tracing.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:01:09] dbug: Exception messages: Assert.Equal() Failure: Strings differ
[16:01:09] dbug: Expected: ""
[16:01:09] dbug: Actual:   "Microsoft-Diagnostics-DiagnosticSource "
[16:01:09] dbug: 2024-07-13 16:01:09.456230-0700 System.Diagnostics.Tracing.Tests[8288:75116]            ↑ (pos 0)   Exception stack traces:    at BasicEventSourceTests.TestUtilities.CheckNoEventSourcesRunning(String message)
[16:01:09] dbug: at BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds()
[16:01:09] dbug: at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[16:01:09] dbug: 2024-07-13 16:01:09.456549-0700 System.Diagnostics.Tracing.Tests[8288:75116]    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[16:01:09] dbug: Execution time: 0.0007236

Error Message

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

{
  "ErrorMessage": "[FAIL] BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=740287
Error message validated: [[FAIL] BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/15/2024 7:18:48 AM UTC

Report

Build Definition Test Pull Request
773348 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
772314 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
763399 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
765139 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
764868 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
761344 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
758343 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
757260 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
756458 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
755747 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
751577 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
750924 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
748618 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution
747439 dotnet/runtime System.Diagnostics.Tracing.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 2 14
@matouskozak matouskozak added area-System.Diagnostics.Tracing blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' os-ios Apple iOS os-tvos Apple tvOS os-maccatalyst MacCatalyst OS Known Build Error Use this to report build issues in the .NET Helix tab labels Jul 15, 2024
Copy link
Contributor

Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to 'os-tvos': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to 'os-maccatalyst': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 15, 2024
Copy link
Contributor

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti
See info in area-owners.md if you want to be subscribed.

@matouskozak
Copy link
Member Author

Could it be related to #104847 @mikelle-rogers ? Even though the PR looks to be CoreCLR specific, it's the only diagnostics-related PR in the range.

@mikelle-rogers
Copy link
Member

I will look into it

@mikelle-rogers
Copy link
Member

As a result of this only reproducing on one test run, we should wait and see if it happens again.

@tommcdon tommcdon added this to the 9.0.0 milestone Jul 15, 2024
@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Jul 15, 2024
@matouskozak
Copy link
Member Author

Thank you for looking into it Mikelle! Based on my investigation it does reproduce on multiple runs, e.g. https://dev.azure.com/dnceng-public/public/_build/results?buildId=740629 and https://dev.azure.com/dnceng-public/public/_build/results?buildId=740849. I'm unsure why the Build Analysis matching doesn't show more hits at the moment.

@mikelle-rogers
Copy link
Member

It has been tested and verified that the commit causing the issue is ee5770d.

@matouskozak
Copy link
Member Author

It has been tested and verified that the commit causing the issue is ee5770d.

Thank you Mikelle for the investigation. @antonfirsov do you know why #103922 could cause these failures?

@tommcdon
Copy link
Member

@antonfirsov would you mind investigating the regression caused by #103922?

@antonfirsov
Copy link
Member

antonfirsov commented Jul 23, 2024

#103922 didn't touch any code in System.Diagnostics.Tracing. My guess is that the introduction of new ActivitySources in System.Net libraries somehow enables the Microsoft-Diagnostics-DiagnosticSource EventSource for test runs on iOS devices, breaking the assumptions the tests have.

A speculative fix idea is to add Microsoft-Diagnostics-DiagnosticSource to the list of built-in event sources in CheckNoEventSourcesRunning:

if (eventSource.Name != "System.Threading.Tasks.TplEventSource" &&
eventSource.Name != "System.Diagnostics.Eventing.FrameworkEventSource" &&
eventSource.Name != "System.Buffers.ArrayPoolEventSource" &&
eventSource.Name != "System.Threading.SynchronizationEventSource" &&
eventSource.Name != "System.Collections.Concurrent.ConcurrentCollectionsEventSource" &&
eventSource.Name != "System.Runtime.InteropServices.InteropEventProvider" &&
eventSource.Name != "System.Reflection.Runtime.Tracing" &&
eventSource.Name != "Microsoft-Windows-DotNETRuntime" &&
eventSource.Name != "System.Runtime" &&
// event source from xunit runner
eventSource.Name != "xUnit.TestEventSource" &&
// These event sources show up when hosted in the VS test runner
eventSource.Name != "System.Net.Sockets" &&
eventSource.Name != "Private.InternalDiagnostics.System.Net.Sockets" &&
eventSource.Name != "TestPlatform"

Otherwise, I lack access to iOS devices and don't have a good understanding of the test+product code in question, so I don't consider myself a good candidate for a deeper investigation.

@antonfirsov antonfirsov removed their assignment Jul 23, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Aug 13, 2024
@matouskozak matouskozak self-assigned this Aug 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics.Tracing blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' in-pr There is an active PR which will close this issue when it is merged Known Build Error Use this to report build issues in the .NET Helix tab os-ios Apple iOS os-maccatalyst MacCatalyst OS os-tvos Apple tvOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants