msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

[WIP] Fix flaky CanShutdownServerProcess test

Open rokonec opened this issue 3 years ago • 23 comments

Context

We detected flaky unit tests related to msbuild server shutdown. Example of failing checks: https://github.com/dotnet/msbuild/pull/7835

Changes Made

Although I do not fully understand root cause, It seems to be related to race condition in Linux between process is finished Process.WaitForExit() and releasing its owned mutexes.

Testing

Several /azp run s

Notes

rokonec avatar Aug 09 '22 11:08 rokonec

/azp run

rokonec avatar Aug 09 '22 11:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 11:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 09 '22 12:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 12:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 09 '22 13:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 13:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 09 '22 14:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 14:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 09 '22 15:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 15:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 09 '22 17:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 17:08 azure-pipelines[bot]

The current test failure is from OldNugetTest. Are we using the server by default now? If so, it may be creating a server process, then expecting it to exit, and it doesn't (nor should it). If that's it, we may need to disable the server for that test.

Forgind avatar Aug 09 '22 17:08 Forgind

/azp run

rokonec avatar Aug 09 '22 19:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 19:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 10 '22 11:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 10 '22 11:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 10 '22 15:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 10 '22 15:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 10 '22 21:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 10 '22 21:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 10 '22 22:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 10 '22 22:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 10 '22 23:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 10 '22 23:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 11 '22 07:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 11 '22 07:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 11 '22 08:08 rokonec

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 11 '22 08:08 azure-pipelines[bot]

/azp run

rokonec avatar Aug 11 '22 09:08 rokonec