You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MSBuildClientApp.TryLaunchServer method returns false in case server node couldn't be started (and build is then done without server). However, there was reported issue, when mutex logic failed with unhandled IOException.
Unhandled exception: System.IO.IOException: Connection timed out : 'Global\msbuild-server-launch-BSVTwDRbqiZ8pAK9bysU7lvA2UC4yhR_+Bc8sTbm8Jw'
at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
at Microsoft.Build.Experimental.MSBuildClient.TryLaunchServer()
at Microsoft.Build.Experimental.MSBuildClient.Execute(CancellationToken cancellationToken)
at Microsoft.Build.CommandLine.MSBuildClientApp.Execute(String[] commandLine, String msbuildLocation, CancellationToken cancellationToken)
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)
at Microsoft.DotNet.Cli.Utils.MSBuildForwardingAppWithoutLogging.ExecuteInProc(String[] arguments)
Hotfix should be easy - insert mutex logic to existing try/catch block. We should also find out why is it time-outing.
…or. (#8024)
Fixes#7993
Summary
In the MSBuild server, we identify the state of the server via mutexes. Sometimes, for reason yet unknown to us, mutex could throw the exception System.IO.IOException: Connection timed out. When this occurs, we fallback to old behavior building without server. We fixed some of those in #8000, but now found more situations when this happens.
Customer Impact
MSBuild non-Windows users could have intermittent error when building with dotnet build.
This does not affect Visual Studio.
Regression?
Yes, this is a regression.
Testing
Unit tests.
Risk
Low risk. The fix adds additional try-catch blocks to process this situation.
Code Reviewers
[TODO]
Description of the fix
Add a try-catch block to catch and process the IOException exception when mutexes are used.
Add a new client exit type for this kind of error.
The
MSBuildClientApp.TryLaunchServer
method returnsfalse
in case server node couldn't be started (and build is then done without server). However, there was reported issue, when mutex logic failed with unhandled IOException.Hotfix should be easy - insert mutex logic to existing
try/catch
block. We should also find out why is it time-outing.dotnet/runtime#75391
dotnet/runtime#75867
The text was updated successfully, but these errors were encountered: