Command-line task reports false success if STDIO left open
See original GitHub issue_Originally posted by @glucaci in https://github.com/microsoft/azure-pipelines-tasks/issues/11334#issuecomment-583333300_
I’ve created new issue because nobody answers on closed one. Below is the content of the original post:
Original:
Lately we have the same problem with a .NET Core Task. I reported this also in https://github.com/microsoft/azure-pipelines-image-generation/issues/1386 because I’m not sure where this fits.
Starting: dotnet tool restore
==============================================================================
Task : .NET Core
Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command
Version : 2.164.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
==============================================================================
/opt/hostedtoolcache/dotnet/dotnet tool restore --ignore-failed-sources --no-cache --verbosity normal
... restoring packages
Restore was successful.
The STDIO streams did not close within 10 seconds of the exit event from process '/opt/hostedtoolcache/dotnet/dotnet'. This may indicate a child process inherited the STDIO streams and has not yet exited.
and the task will remain blocked until build timeout expires.
Update:
Also with Task Version 2.169.1
Workaround:
Enable Continue on error
and set Timeout
on 1 min
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:28 (7 by maintainers)
Top Results From Across the Web
MSB4181: The 'task' task returned false but did not log an error
In this article. This error occurs when a task returned false to signal that it didn't complete successfully, but didn't log an error....
Read more >Tasks in Visual Studio Code
Integrate with External Tools via Tasks. Lots of tools exist to automate tasks like linting, building, packaging, testing, or deploying software systems.
Read more >Troubleshoot build performance with Build Analyzer
This means that those tasks outputs are most likely not being preserved between builds and those tasks always run, even when there are...
Read more >Visual Studio compiles fine, but it still shows red lines
Are you perhaps running old code? Try a small implementation that shows something, if nothing happens you might be running old code. –...
Read more >Command: validate | Terraform - HashiCorp Developer
Validate runs checks that verify whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m having the same issue. Before this task I also do a NuGetAuthenticate, because we are using a DevOps Artifact Repo. Before I noticed it was running for 45mins. It happens about once every 20 builds.
This is part of the pipeline, the log for the last step is below;
As suggested by others we also have the following variables in our yml; reference https://developercommunity.visualstudio.com/content/problem/899022/dotnetcorecli-5.html If I omit this our “dotnet tool restore” fails even more often.
There is nothing more to add from the logs, it’s running
dotnet tool restore
successfully and then it blocks and you can see the messageThe STDIO streams did not close...
.I don’t know how you can reproduce it, because also on our pipelines it happens sporadic and i assume it’s a race condition somehow.