1
votes

In our pipeline for the past 3 weeks, the dotnet test task has not been terminating at all, and we are forced to cancel the pipeline.

We have observed this log, which we had not seen prior to 3 weeks: (No changes have been made in these 3 weeks at all, either to our code or to Windows on our on premise agent, SQL Server or any other service in the agent).

The STDIO streams did not close within 10 seconds of the exit event from process 'C:\AzAgent_work_tool\dotnet\dotnet.exe'. This may indicate a child process inherited the STDIO streams and has not yet exited.

##[error]Error: The process 'C:\AzAgent_work_tool\dotnet\dotnet.exe' failed with exit code 1

All the tests in the task pass though.

Publishing test results to test run '1033120'. TestResults To Publish 233, Test run id:1033120 Test results publishing 233, remaining: 0. Test run id: 1033120 Published Test Run :

The test results are published.

We have observed this in the logs:

*##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build

Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting*

Hence we added this in our yaml before the test task, as our app is built with .NET Core 3.1:

- task: UseDotNet@2
      inputs:
        packageType: sdk
        version: 3.x
        installationPath: $(Agent.ToolsDirectory)/dotnet
      displayName: 'Installing .net core sdk 3.x'
      condition: succeeded()

I did a little investigation and found this link on the MS github page: https://github.com/microsoft/azure-pipelines-tasks/issues/13033

We have set these variables: TASKLIB_TEST_TOOLRUNNER_EXITDELAY 60000

  • name: 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' value: 30
    • name: 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' value: 30

No effect yet. How can we solve this issue? It is not affecting our release but we would like to have a green pipeline? Tips on this would be greatly helpful

1
Does this workaround that enabling Continue on error and set the dotnet test task Timeout on specific mins work as mentioned in thread: github.com/microsoft/azure-pipelines-tasks/issues/13033? Please check it and kindly let us know the result.Edward Han-MSFT
@EdwardHan-MSFT it was an issue with chromedriver exe that we use which we did not update for chrome 89. Hence one of the tests was hanging. When I ran a few tests excluding that with a testcategory filter, it ran fine. So then after changing the chromedriver and removing the filter, the tests ran fine and the stage terminated. So no changes to pipeline yaml were required. Thanks for the inputAshwin Hariharan
Hi Ashwin, If this is the answer, it would be better if you could Accept it as an Answer, it could quickly help other community members who get the same issues, thank you.Edward Han-MSFT

1 Answers

1
votes

Thanks for Ashwin's answer.

There was an issue with chromedriver exe which used was not updated for chrome 89. Hence one of the tests was hanging. So then after changing the chromedriver and removing the filter, the tests ran fine and the stage terminated. So no changes to pipeline yaml were required.

Posting here so others who have the same issue can find this answer quickly.