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

Unhandled exception. System.IO.EndOfStreamException: Unable to read beyond the end of the stream. #5061

Open
Evangelink opened this issue Nov 26, 2024 · 5 comments
Assignees
Labels
Milestone

Comments

@Evangelink
Copy link
Member

Description

We are trying to enable macos pipeline for our new testing platform and we are getting quite a lot of our acceptance tests related to dump creation failing. See microsoft/testfx#4155

One of the issue is:

Unhandled exception. System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.BinaryReader.ReadUInt16()
   at Microsoft.Diagnostics.NETCore.Client.IpcHeader.Parse(BinaryReader reader)
   at Microsoft.Diagnostics.NETCore.Client.IpcMessage.Parse(Stream stream)
   at Microsoft.Diagnostics.NETCore.Client.IpcClient.Read(Stream stream)
   at Microsoft.Diagnostics.NETCore.Client.IpcClient.SendMessageGetContinuation(IpcEndpoint endpoint, IpcMessage message)
   at Microsoft.Diagnostics.NETCore.Client.IpcClient.SendMessage(IpcEndpoint endpoint, IpcMessage message)
   at Microsoft.Diagnostics.NETCore.Client.DiagnosticsClient.WriteDump(DumpType dumpType, String dumpPath, WriteDumpFlags flags)
   at Microsoft.Diagnostics.NETCore.Client.DiagnosticsClient.WriteDump(DumpType dumpType, String dumpPath, Boolean logDumpGeneration)
   at Microsoft.Testing.Extensions.Diagnostics.HangDumpProcessLifetimeHandler.TakeDumpAsync() in /_/src/Platform/Microsoft.Testing.Extensions.HangDump/HangDumpProcessLifetimeHandler.cs:line 375
   at Microsoft.Testing.Extensions.Diagnostics.HangDumpProcessLifetimeHandler.ActivityTimerAsync() in /_/src/Platform/Microsoft.Testing.Extensions.HangDump/HangDumpProcessLifetimeHandler.cs:line 318
   at Microsoft.Testing.Platform.Helpers.SystemTask.<>c__DisplayClass4_0.<RunLongRunning>b__0() in /_/src/Platform/Microsoft.Testing.Platform/Helpers/System/SystemTask.cs:line 33
   at System.Threading.Thread.StartCallback()
Test suite failed with and exit code different that 2 (failed tests). Failure related to an unexpected condition. Exit code '134'

Configuration

We are using macos-latest on AzDO hosted pool.

Regression?

No idea, we are enabling macos.
We recently bumped to 0.2.553101, I'll try to downgrade and see if that changes anything.

@Evangelink Evangelink added the bug Something isn't working label Nov 26, 2024
@tommcdon tommcdon added this to the 10.0.0 milestone Dec 2, 2024
@tommcdon
Copy link
Member

tommcdon commented Dec 2, 2024

@mikem8361

@Evangelink
Copy link
Member Author

Downgrading didn't help

@nohwnd
Copy link
Member

nohwnd commented Mar 3, 2025

@mikem8361 is there any plan or update around this please? We have another report of this failing on MacOS. microsoft/testfx#5157 (comment)

Which prevents the user from getting dumps on MacOS and makes developing their testing framework (TUnit) harder.

We are still using version: <PackageVersion Include="Microsoft.Diagnostics.NETCore.Client" Version="0.2.553101" />

https://github.com/microsoft/testfx/blob/main/Directory.Packages.props#L49

@tommcdon
Copy link
Member

tommcdon commented Mar 3, 2025

@nohwnd We apologize for the delay! This issue is on our backlog, but until we have time to get to this issue, would it be possible to try updating to the latest released version of the net core client? https://github.com/dotnet/diagnostics/releases/tag/v9.0.607501. If that doesn't work, would it be possible to provide a small, reproducible test case we can use for investigation?

@thomhurst
Copy link

thomhurst commented Mar 4, 2025

Still errors with an explicit reference to that package.

This repo can reproduce it: https://github.com/thomhurst/Microsoft.Testing.Platform.Reproductions/tree/d3e879aa41ccfd7973c0e129062a1ccc8b4114d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants