Skip to content
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

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

Open
JaynieBai opened this issue Aug 28, 2023 · 6 comments
Open

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

JaynieBai opened this issue Aug 28, 2023 · 6 comments
Assignees
Labels
Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. needs-investigation

Comments

@JaynieBai
Copy link
Member

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 JaynieBai added the Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. label Aug 28, 2023
@JaynieBai JaynieBai self-assigned this Aug 28, 2023
@rainersigwald
Copy link
Member

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.

@JaynieBai
Copy link
Member Author

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 JaynieBai removed their assignment Sep 6, 2023
@JaynieBai
Copy link
Member Author

JaynieBai commented Sep 18, 2023

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

{
File.Delete(fileName);
}
catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
{
// Warn only -- occasionally temp files fail to delete because of virus checkers; we
// don't want the build to fail in such cases
LogShared.LogWarningWithCodeFromResources("Shared.FailedDeletingTempFile", fileName, e.Message);
}

@JaynieBai
Copy link
Member Author

JaynieBai commented Oct 31, 2023

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

{
File.Delete(fileName);
}
catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
{
// Warn only -- occasionally temp files fail to delete because of virus checkers; we
// don't want the build to fail in such cases
LogShared.LogWarningWithCodeFromResources("Shared.FailedDeletingTempFile", fileName, e.Message);
}

@YuliiaKovalova
Copy link
Member

YuliiaKovalova commented Mar 6, 2024

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

JaynieBai added a commit that referenced this issue Jan 6, 2025
…c_Tests.Timeout (#9386)

Add more processes Logs for failed case Microsoft.Build.UnitTests.Exec_Tests.Timeout
To understand why the warning #9176 (comment) occurs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. needs-investigation
Projects
None yet
Development

No branches or pull requests

4 participants