Skip to content

Better handle if a BuildHost process crashes that prevents connection#81041

Merged
jasonmalinowski merged 2 commits intodotnet:mainfrom
jasonmalinowski:report-process-failures-that-prevent-connection
Nov 5, 2025
Merged

Better handle if a BuildHost process crashes that prevents connection#81041
jasonmalinowski merged 2 commits intodotnet:mainfrom
jasonmalinowski:report-process-failures-that-prevent-connection

Conversation

@jasonmalinowski
Copy link
Member

When we switched over to using named pipes to connect to the BuildHost process, we lost our handling of a BuildHost process crashing right away. This restores the logging logic so we can log the stdout and stderr of the process to understand the root cause.

When we switched over to using named pipes to connect to the BuildHost
process, we lost our handling of a BuildHost process crashing right
away. This restores the logging logic so we can log the stdout and
stderr of the process to understand the root cause.
@jasonmalinowski jasonmalinowski self-assigned this Nov 5, 2025
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner November 5, 2025 00:29
}

public RemoteBuildHost BuildHost { get; }
public RemoteBuildHost BuildHost =>_buildHost ?? throw new InvalidOperationException("Build host is not connected.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should _buildHost get cleared anywhere? Process_Exited or DisposeAsync?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, I'm not sure to what end though. DisposeAsync() isn't using it -- at that point it's shutting down the _rpcClient, and we've already got null checking there.

@jasonmalinowski jasonmalinowski force-pushed the report-process-failures-that-prevent-connection branch from ec1aa45 to d9d32cf Compare November 5, 2025 00:45
@jasonmalinowski jasonmalinowski force-pushed the report-process-failures-that-prevent-connection branch from d9d32cf to 06141dd Compare November 5, 2025 01:56
@jasonmalinowski jasonmalinowski merged commit c2fc477 into dotnet:main Nov 5, 2025
26 checks passed
@jasonmalinowski jasonmalinowski deleted the report-process-failures-that-prevent-connection branch November 5, 2025 04:22
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 5, 2025
@davidwengier davidwengier modified the milestones: Next, 18.3 Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants