dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.03k stars 4.68k forks source link

Desktop: BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener failed with "System.Diagnostics.Tracing.EventSourceException" #21564

Closed KristinXie1 closed 1 year ago

KristinXie1 commented 7 years ago

Failed tests: BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener_UseEvents

Detail: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_netfx_windows_nt_debug/45/testReport/BasicEventSourceTests/TestsWrite/Test_Write_T_EventListener/

MESSAGE:

System.Diagnostics.Tracing.EventSourceException : An error occurred when writing to a listener.
  ---- Assert.Equal() Failure
         Expected: (null)
         Actual:

STACK TRACE:

at System.Diagnostics.Tracing.EventSource.DisptachToAllListeners(Int32 eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs) 
at System.Diagnostics.Tracing.EventSource.WriteToAllListeners(Int32 eventId, Guid* childActivityID, Int32 eventDataCount, EventData* data) 
at System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(Int32 eventId, Guid* relatedActivityId, Int32 eventDataCount, EventData* data) 
at System.Diagnostics.Tracing.EventSource.WriteEvent(Int32 eventId, String arg1, Int32 arg2) 
at BasicEventSourceTests.EventTestHarness.TestHarnessEventSource.StartTest(String name, Int32 testNumber) 
in D:\j\workspace\outerloop_net---903ddde6\src\System.Diagnostics.Tracing\tests\BasicEventSourceTest\Harness\EventTestHarness.cs:line 130 
at BasicEventSourceTests.EventTestHarness.RunTests(List`1 tests, Listener listener, EventSource source, FilteringOptions options) 
in D:\j\workspace\outerloop_net---903ddde6\src\System.Diagnostics.Tracing\tests\BasicEventSourceTest\Harness\EventTestHarness.cs:line 105 
at BasicEventSourceTests.TestsWrite.Test_Write_T(Listener listener) 
in D:\j\workspace\outerloop_net---903ddde6\src\System.Diagnostics.Tracing\tests\BasicEventSourceTest\TestsWrite.cs:line 398 
at BasicEventSourceTests.TestsWrite.Test_Write_T_EventListener() 
in D:\j\workspace\outerloop_net---903ddde6\src\System.Diagnostics.Tracing\tests\BasicEventSourceTest\TestsWrite.cs:line 46 
----- Inner Stack Trace ----- 
at BasicEventSourceTests.TestsWrite.<>c__DisplayClass3_0.<Test_Write_T>b__27(Event evt) 
in D:\j\workspace\outerloop_net---903ddde6\src\System.Diagnostics.Tracing\tests\BasicEventSourceTest\TestsWrite.cs:line 373 
at BasicEventSourceTests.EventTestHarness.<>c__DisplayClass0_0.<RunTests>b__0(Event data) 
in D:\j\workspace\outerloop_net---903ddde6\src\System.Diagnostics.Tracing\tests\BasicEventSourceTest\Harness\EventTestHarness.cs:line 65 
at BasicEventSourceTests.EventListenerListener.HelperEventListener.OnEventWritten(EventWrittenEventArgs eventData) 
in D:\j\workspace\outerloop_net---903ddde6\src\System.Diagnostics.Tracing\tests\BasicEventSourceTest\Harness\Listeners.cs:line 378 
at System.Diagnostics.Tracing.EventSource.DisptachToAllListeners(Int32 eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs)
karelz commented 7 years ago

@vancem @brianrob @valenis can you please triage milestone?

stephentoub commented 7 years ago

The test came from the desktop tests, passes on core, and is apparently failing on desktop, but I can't repro that locally. Seems like a configuration issue, e.g. an issue that was fixed in a later desktop version than CI is using. I'm pushing it to Future.

KristinXie1 commented 7 years ago

Following tests failed with same issue: BasicEventSourceTests.TestsWriteEvent/Test_WriteEvent_ComplexData_SelfDescribing_EventListener BasicEventSourceTests.TestsWriteEvent/Test_WriteEvent_Manifest_EventListener BasicEventSourceTests.TestsWriteEvent/Test_WriteEvent_Manifest_EventListener_UseEvents

Detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Filc~2F/build/20170619.01/workItem/System.Diagnostics.Tracing.Tests/analysis/xunit/BasicEventSourceTests.TestsWriteEvent~2FTest_WriteEvent_ComplexData_SelfDescribing_EventListener

karelz commented 7 years ago

Moving to UWP6.0 milestone as it failed on UWP as well.

danmoseley commented 7 years ago

Error is System.Diagnostics.Tracing.EventSourceException : An error occurred when writing to a listener.\r\n---- Assert.Equal() Failure\r\nExpected: 0\r\nActual: 1

@brianrob is this something you could look at ?

brianrob commented 7 years ago

Clearing uwp as this is now fixed on uwp runs.

KristinXie1 commented 7 years ago

This issue is repro on UWP ILC tests, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Filc~2F/build/20170726.01/workItem/System.Diagnostics.Tracing.Tests/analysis/xunit/BasicEventSourceTests.TestEventCounter~2FTest_Write_Metric_EventListener

KristinXie1 commented 7 years ago

This issue is repro on Core Tests (Master), detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20170727.01/workItem/System.Diagnostics.Tracing.Tests/analysis/xunit/BasicEventSourceTests.TestEventCounter~2FTest_Write_Metric_EventListener

safern commented 7 years ago

This is failing in uwp consistently.

joshfree commented 7 years ago

@DrewScoggins PTAL while @brianrob is OOF

brianrob commented 7 years ago

The re-activation is actually for a different test not originally covered by this issue. It is due to dotnet/corefx#22422, which is not in any release branches. Thus, it does not need to be fixed for UWP6.0. I've filed dotnet/corefx#22791 to track this.

ghost commented 1 year ago

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

ghost commented 1 year ago

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.