-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add comprehensive hang detection and diagnostics to CanceledTasksDoNotLogMSB4181 test #12057
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
Conversation
Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
…ostics Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com>
please address these build issues: Check failure on line 9 in Build log @azure-pipelines Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\artifacts\TestResults @azure-pipelines src\Build.UnitTests\BackEnd\TaskBuilder_Tests.cs(266,80): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Contains' takes 2 arguments @azure-pipelines src\Build.UnitTests\BackEnd\TaskBuilder_Tests.cs(320,13): error IDE0011: (NETCORE_ENGINEERING_TELEMETRY=Build) Add braces to 'if' statement. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0011) @azure-pipelines src\Build.UnitTests\BackEnd\TaskBuilder_Tests.cs(266,80): error CS1501: (NETCORE_ENGINEERING_TELEMETRY=Build) No overload for method 'Contains' takes 2 arguments @azure-pipelines src\Build.UnitTests\BackEnd\TaskBuilder_Tests.cs(320,13): error IDE0011: (NETCORE_ENGINEERING_TELEMETRY=Build) Add braces to 'if' statement. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0011) |
Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com>
Fixed the build errors in commit 32324f4:
The project now builds successfully on .NET 9.0 and the test runs correctly. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Problem
The
CanceledTasksDoNotLogMSB4181
test has been experiencing intermittent failures on build machines with the error:This could indicate either:
Without proper diagnostics, it's impossible to distinguish between these scenarios.
Solution
This PR implements comprehensive hang detection and diagnostics for the failing test by adding a new
WaitWithMSBuildHangDetection
method that provides:🔍 Intelligent Timeout Strategy
📊 MSBuild Process Monitoring
Tracks all MSBuild-related processes during cancellation:
dotnet.exe
,MSBuild.exe
,VBCSCompiler.exe
,csc.exe
, shell processes🚨 Hang Pattern Detection
Automated detection for common hang scenarios:
🔧 Diagnostic Data Collection
dotnet-dump
📋 Enhanced Failure Analysis
When the test fails, it now provides:
Implementation Details
Testing
This enhancement will provide definitive evidence to determine whether timeout failures represent test infrastructure issues or genuine MSBuild cancellation bugs, enabling targeted fixes instead of blind timeout increases.
Fixes #9638.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
dnceng.pkgs.visualstudio.com
dotnet build src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj --no-restore
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.