msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

[Flaky test] Microsoft.Build.UnitTests.Exec_Tests.Timeout

Open JaynieBai opened this issue 2 years ago • 5 comments

Microsoft.Build.UnitTests.Exec_Tests.Timeout

Details

https://dev.azure.com/dnceng-public/public/_build/results?buildId=385968&view=ms.vss-test-web.build-test-results-tab&runId=8250290&resultId=105001&paneView=history

https://dev.azure.com/dnceng-public/public/_build/results?buildId=385824&view=ms.vss-test-web.build-test-results-tab&runId=8245228&resultId=104901

Assert.Equal() Failure\r\nExpected: 1\r\nActual: 2

at Microsoft.Build.UnitTests.Exec_Tests.Timeout() in D:\a\_work\1\s\src\Tasks.UnitTests\Exec_Tests.cs:line 133

JaynieBai avatar Aug 28 '23 07:08 JaynieBai

WARNING MSB5018: Failed to delete the temporary file "C:\Users\cloudtest\AppData\Local\Temp\wjicfzi0.4pf\MSBuildTempcloudtest\tmp141ec17b96ed46fbbe9a45ffeade2592.exec.cmd". Access to the path 'C:\Users\cloudtest\AppData\Local\Temp\wjicfzi0.4pf\MSBuildTempcloudtest\tmp141ec17b96ed46fbbe9a45ffeade2592.exec.cmd' is denied.

Is an interesting symptom that I certainly don't understand immediately.

rainersigwald avatar Aug 28 '23 15:08 rainersigwald

WARNING MSB5018: Failed to delete the temporary file "C:\Users\cloudtest\AppData\Local\Temp\wjicfzi0.4pf\MSBuildTempcloudtest\tmp141ec17b96ed46fbbe9a45ffeade2592.exec.cmd". Access to the path 'C:\Users\cloudtest\AppData\Local\Temp\wjicfzi0.4pf\MSBuildTempcloudtest\tmp141ec17b96ed46fbbe9a45ffeade2592.exec.cmd' is denied.

Is an interesting symptom that I certainly don't understand immediately.

@rainersigwald Where did you find another warning?

JaynieBai avatar Aug 29 '23 02:08 JaynieBai

WARNING MSB5018: Failed to delete the temporary file "C:\Users\cloudtest\AppData\Local\Temp\wjicfzi0.4pf\MSBuildTempcloudtest\tmp141ec17b96ed46fbbe9a45ffeade2592.exec.cmd". Access to the path 'C:\Users\cloudtest\AppData\Local\Temp\wjicfzi0.4pf\MSBuildTempcloudtest\tmp141ec17b96ed46fbbe9a45ffeade2592.exec.cmd' is denied.

Is an interesting symptom that I certainly don't understand immediately.

@rainersigwald Where did you find another warning?

Find the log in the attachments. https://dev.azure.com/dnceng-public/public/_build/results?buildId=405969&view=ms.vss-test-web.build-test-results-tab&runId=8806674&resultId=105005&paneView=attachments

The file is created when _batchFile = FileUtilities.GetTemporaryFileName(".exec.cmd");

Throw the exception when https://github.com/dotnet/msbuild/blob/caf06d19326f9e7dcc06d4d4f4b04f1c6ddae5f0/src/Utilities/ToolTask.cs#L809-L817

JaynieBai avatar Sep 18 '23 09:09 JaynieBai

Throw the exception in the following code. But couldn't find a way to know which process makes the file not be deleted until now

https://github.com/dotnet/msbuild/blob/caf06d19326f9e7dcc06d4d4f4b04f1c6ddae5f0/src/Utilities/ToolTask.cs#L809-L817

JaynieBai avatar Oct 31 '23 07:10 JaynieBai

Please extend the logging/consider warning suppression for this test and close the ticket.

YuliiaKovalova avatar Mar 06 '24 09:03 YuliiaKovalova

Failed again in the latest build https://dev.azure.com/dnceng-public/public/_build/results?buildId=723939&view=ms.vss-test-web.build-test-results-tab&runId=18168528&resultId=105065&paneView=debug

JaynieBai avatar Jul 01 '24 06:07 JaynieBai

This commit https://github.com/dotnet/msbuild/commit/d7788d644e1b463b996107e7dcce358b8eaeccaa#diff-3abd8382aac3bdfa59d5c1ca41dd089795d6ca539a00b3c50eab4fd6a0996314 including string lockedFileMessage = LockCheck.GetLockedFileMessage(fileName); doesn't include the block process info in the new run https://dev.azure.com/dnceng-public/public/_build/results?buildId=933070&view=ms.vss-test-web.build-test-results-tab&runId=24707220&resultId=105105&paneView=debug

Shouldly.ShouldAssertException : warningsCount\r\n should be\r\n1\r\n but was\r\n2\r\n\r\nAdditional Info:\r\n Expected 1 warning, encountered 2: Terminating the task executable "cmd" because it did not finish within the specified limit of 5 milliseconds.,Failed to delete the temporary file "C:\Users\cloudtest\AppData\Local\Temp\kdgi3310.yrd\MSBuildTemp\tmp0b07b143716145d5940700444ff44098.exec.cmd". Access to the path 'C:\Users\cloudtest\AppData\Local\Temp\kdgi3310.yrd\MSBuildTemp\tmp0b07b143716145d5940700444ff44098.exec.cmd' is denied.

JaynieBai avatar Feb 07 '25 04:02 JaynieBai