[Bug]: Microsoft.Build.Linux.Tasks.dll has hard coded 5 second timeout in ConnectionCache.TestSystemConnected method which can cause problems.
Issue Description
Overview
We have a solution that has 6 projects with makefiles, which build Linux C++projects. We call azure dev ops pipelines using msbuild tasks and some times we get errors like:
##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Application Type\Linux\1.0\Linux.Makefile.Targets(208,5): Error : Timed out executing command 'echo '3d94e23e-ab98-4b5d-831b-5ab5db730307'', waited for 5075.937ms.
This call can be traced to Microsoft.Build.Linux.Tasks.dll has hard coded 5 second timeout in ConnectionCache.TestSystemConnected method.
This error is intermittent for us, and happens some times. I've played with SSH options on our Linux box and have optimized as much as I can. I understand 5 seconds should be enough time but for our situation sometimes its not long enough.
Question
Can this call be changed in the future to a customizable timeout?
Steps to Reproduce
##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Application Type\Linux\1.0\Linux.Makefile.Targets(208,5): Error : Timed out executing command 'echo '3d94e23e-ab98-4b5d-831b-5ab5db730307'', waited for 5075.937ms.
Expected Behavior
Customizable timeout in Microsoft.Build.Linux.Tasks.dll -> ConnectionCache.TestSystemConnected method.
Actual Behavior
Hardcoded timeout preventing compiling if it doesn't respond within 5 seconds.
Analysis
Hardcoded timeout in Microsoft.Build.Linux.Tasks.dll -> ConnectionCache.TestSystemConnected method of five seconds. This for my situation should be greater than 5 seconds or customizable.
Versions & Configurations
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin>MSBuild --version MSBuild version 17.6.3+07e294721 for .NET Framework 17.6.3.22601 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin>
Despite the namespace, that task is not part of MSBuild itself. It is part of Visual Studio. Can you open a feedback ticket instead?
After it's created, that will open an internal bug which will be routed to the right team. If you post the link here we may be able to help that process go faster.
Thanks I created a ticket with this url:
https://developercommunity.visualstudio.com/t/MicrosoftBuildLinuxTasksdll-has-hard/10421901?port=1025&fsid=f551bc9d-c823-405a-9ae7-5bcef5335432