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

[test failure] TestCounterMonitorSystemRuntimeMetricsCSV intermittently fails: System.IO.EndOfStreamException : Attempted to read past the end of the stream. #4757

Open
elinor-fung opened this issue Jun 24, 2024 · 0 comments

Comments

@elinor-fung
Copy link
Member

Failing test: TestCounterMonitorSystemRuntimeMetricsCSV
Environment: Ubuntu_22_04_x64_Release

Intermittent - seems like it may be a race condition in stopping processing:

System.InvalidOperationException : End of stream\n---- System.IO.EndOfStreamException : Attempted to read past the end of the stream.
   at Microsoft.Diagnostics.Monitoring.EventPipe.EventPipeStreamProvider.ProcessEvents(DiagnosticsClient client, TimeSpan duration, Boolean resumeRuntime, CancellationToken cancellationToken) in /__w/1/s/src/Microsoft.Diagnostics.Monitoring.EventPipe/EventPipeStreamProvider.cs:line 86
   at Microsoft.Diagnostics.Monitoring.EventPipe.DiagnosticsEventPipeProcessor.<>c__DisplayClass11_0.<<Process>b__1>d.MoveNext() in /__w/1/s/src/Microsoft.Diagnostics.Monitoring.EventPipe/DiagnosticsEventPipeProcessor.cs:line 56
--- End of stack trace from previous location ---
   at Microsoft.Diagnostics.Monitoring.EventPipe.DiagnosticsEventPipeProcessor.StopProcessing() in /__w/1/s/src/Microsoft.Diagnostics.Monitoring.EventPipe/DiagnosticsEventPipeProcessor.cs:line 119
   at Microsoft.Diagnostics.Monitoring.EventPipe.EventSourcePipeline`1.OnStop(CancellationToken token) in /__w/1/s/src/Microsoft.Diagnostics.Monitoring.EventPipe/EventSourcePipeline.cs:line 63
   at Microsoft.Diagnostics.Monitoring.Pipeline.StopAsyncCore(CancellationToken token) in /__w/1/s/src/Microsoft.Diagnostics.Monitoring/Pipeline.cs:line 148
   at Microsoft.Diagnostics.Monitoring.Pipeline.SafeExecuteTask(Func`1 acquireTask) in /__w/1/s/src/Microsoft.Diagnostics.Monitoring/Pipeline.cs:line 208
   at Microsoft.Diagnostics.Tools.Counters.CounterMonitor.Collect(CancellationToken ct, List`1 counter_list, String counters, IConsole console, Int32 processId, Int32 refreshInterval, CountersExportFormat format, String output, String name, String diagnosticPort, Boolean resumeRuntime, Int32 maxHistograms, Int32 maxTimeSeries, TimeSpan duration) in /__w/1/s/src/Tools/dotnet-counters/CounterMonitor.cs:line 330
   at DotnetCounters.UnitTests.CounterMonitorPayloadTests.<>c__DisplayClass15_1.<<GetCounterTrace>b__1>d.MoveNext() in /__w/1/s/src/tests/dotnet-counters/CounterMonitorPayloadTests.cs:line 209
--- End of stack trace from previous location ---
   at CommonTestRunner.TestRunnerUtilities.ExecuteCollection(Task collectionTask, TestRunner testRunner, CancellationToken token, Func`2 waitForPipeline) in /__w/1/s/src/tests/CommonTestRunner/TestRunnerUtilities.cs:line 50
   at CommonTestRunner.TestRunnerUtilities.ExecuteCollection(Func`2 executeCollection, TestRunner testRunner, CancellationToken token) in /__w/1/s/src/tests/CommonTestRunner/TestRunnerUtilities.cs:line 28
   at DotnetCounters.UnitTests.CounterMonitorPayloadTests.GetCounterTrace(TestConfiguration configuration, List`1 counterList, String path, CountersExportFormat exportFormat, Func`1 CreateMetricComponents) in /__w/1/s/src/tests/dotnet-counters/CounterMonitorPayloadTests.cs:line 207
   at DotnetCounters.UnitTests.CounterMonitorPayloadTests.GetCounterTrace(TestConfiguration configuration, List`1 counterList, String path, CountersExportFormat exportFormat, Func`1 CreateMetricComponents) in /__w/1/s/src/tests/dotnet-counters/CounterMonitorPayloadTests.cs:line 226
   at DotnetCounters.UnitTests.CounterMonitorPayloadTests.GetCounterTraceCSV(TestConfiguration configuration, List`1 counterList) in /__w/1/s/src/tests/dotnet-counters/CounterMonitorPayloadTests.cs:line 172
   at DotnetCounters.UnitTests.CounterMonitorPayloadTests.TestCounterMonitorSystemRuntimeMetricsCSV(TestConfiguration configuration) in /__w/1/s/src/tests/dotnet-counters/CounterMonitorPayloadTests.cs:line 84
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
   at Microsoft.Diagnostics.NETCore.Client.StreamExtensions.ReadBytesAsync(Stream stream, Int32 length, CancellationToken cancellationToken) in /__w/1/s/src/Microsoft.Diagnostics.NETCore.Client/StreamExtensions.cs:line 23
   at Microsoft.Diagnostics.NETCore.Client.IpcHeader.ParseAsync(Stream stream, CancellationToken cancellationToken) in /__w/1/s/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcHeader.cs:line 69
   at Microsoft.Diagnostics.NETCore.Client.IpcMessage.ParseAsync(Stream stream, CancellationToken cancellationToken) in /__w/1/s/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcMessage.cs:line 126
   at Microsoft.Diagnostics.NETCore.Client.IpcClient.SendMessageGetContinuationAsync(IpcEndpoint endpoint, IpcMessage message, CancellationToken cancellationToken) in /__w/1/s/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcClient.cs:line 83
   at Microsoft.Diagnostics.NETCore.Client.EventPipeSession.StartAsync(IpcEndpoint endpoint, EventPipeSessionConfiguration config, CancellationToken cancellationToken) in /__w/1/s/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/EventPipeSession.cs:line 52
   at Microsoft.Diagnostics.Monitoring.EventPipe.EventPipeStreamProvider.ProcessEvents(DiagnosticsClient client, TimeSpan duration, Boolean resumeRuntime, CancellationToken cancellationToken) in /__w/1/s/src/Microsoft.Diagnostics.Monitoring.EventPipe/EventPipeStreamProvider.cs:line 40

#4751 - test result

AzureDevOpsTests
| where Repository == "dotnet/diagnostics"
| where Message contains "EndOfStreamException"
@tommcdon tommcdon added this to the 9.0.0 milestone Jun 25, 2024
@mikem8361 mikem8361 added the testing Test work item label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants