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

[Question]: How to set a runtime Knob for a specific pipeline #4317

Closed
2 of 4 tasks
afscrome opened this issue Jun 8, 2023 · 2 comments
Closed
2 of 4 tasks

[Question]: How to set a runtime Knob for a specific pipeline #4317

afscrome opened this issue Jun 8, 2023 · 2 comments

Comments

@afscrome
Copy link

afscrome commented Jun 8, 2023

Describe your question

Certain setup failures in webdriver cause some of our test runs to hit microsoft/azure-pipelines-tasks#17548 . The dotnet test process finishes, but the dotnet test step in ado hangs until the task is canceled, or the job hits the 60 second timeout.

A suggestion has been to set the VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT knob, however I don't see how to do that on the hosted agent pools. Attempting to set the variable VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT in the yaml pipeline results in the pipeline to refeuse to schedule with an error

image

In looking at the code, the knob has a RuntimeKnobSource and I can also see in the "Initalise Job" phase it loads the knob, which together I'd assume means it is expected this knob could be set on a per job basis. How do I override this for a single job. (The pipeline is running against the ubunut-latest hosted agent, although I experience the same issue pointing this to a self hosted agent).

Logs from the DotNetCoreCLI@2 task for which I'm trying to use this knob to fix.

...
Failed!  - Failed:     1, Passed:     0, Skipped:     0, Total:     1, Duration:  - /home/vsts/work/1/Foo/Bar.dll (net6.0)

HANG - the next set of logs don't show up until the job times out, or is explicitly cancelled

The STDIO streams did not close within 10 seconds of the exit event from process '/usr/bin/dotnet'. This may indicate a child process inherited the STDIO streams and has not yet exited.
##[error]Error: The process '/usr/bin/dotnet' failed with exit code 1
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
##[error]Dotnet command failed with non-zero exit code on the following projects : [ '' ]
##[error]The operation was canceled.

Versions

Agent: 3.220.5

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Operation system

ubuntu-latest

Version controll system

No response

Azure DevOps Server Version (if applicable)

No response

@DmitriiBobreshev
Copy link
Contributor

Hi @afscrome, thank you for the question, you could set the knob using UI with User-defined capabilities for hosted agents.
image
Just click on the plus button and add VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT.

image

Copy link

github-actions bot commented Dec 6, 2023

This issue has had no activity in 180 days. Please comment if it is not actually stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants