terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Terraform 0.14.x hangs sometimes under Windows - 0.12.24 is working fine

Open toralf opened this issue 4 years ago • 3 comments


foersto@NHH44173 MINGW64 /
$ export TF_LOG=TRACE

foersto@NHH44173 MINGW64 /
$ terraform --version
2021/05/27 10:10:42 [INFO] Terraform version: 0.14.11
2021/05/27 10:10:42 [INFO] Go runtime version: go1.15.6
2021/05/27 10:10:42 [INFO] CLI args: []string{"C:\\Users\\foersto\\bin\\terraform.exe", "--version"}
2021/05/27 10:10:42 [DEBUG] Attempting to open CLI config file: C:\Users\foersto\AppData\Roaming\terraform.rc
2021/05/27 10:10:42 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021/05/27 10:10:42 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021/05/27 10:10:42 [DEBUG] ignoring non-existing provider search directory C:\Users\foersto\AppData\Roaming\terraform.d\plugins
Terraform v0.14.11

Your version of Terraform is out of date! The latest version
is 0.15.4. You can update by downloading from https://www.terraform.io/downloads.html
2021/05/27 10:10:42 [DEBUG] ignoring non-existing provider search directory C:\Users\foersto\AppData\Roaming\HashiCorp\Terraform\plugins
2021/05/27 10:10:42 [INFO] CLI command args: []string{"version", "--version"}

This happenes under straight Windows Terminal nas well as under Git Bash ad Cygwin. it just does not exits after it made it works. So for a terraform plan we see the output but the command does not return :-/

toralf avatar May 27 '21 08:05 toralf

Hi @toralf, thanks for reporting this. These types of issues generally end up coming down to antivirus software blocking certain OS operations Terraform may perform. Are you able to reliably reproduce the issue? Are you using antivirus/antimalware software on your machine?

alisdair avatar May 27 '21 18:05 alisdair

The issue happens annoying often, but not 100% - but was not observed with 0.12.24, but with all 0.13.x and above. And yes, it is a company desktop therefore has AV software at it.

toralf avatar May 27 '21 19:05 toralf

Hi @toralf! Sorry for the slow response.

Unfortunately, as @alisdair said, antivirus software has been a common cause of problems of this sort because it tends to intercept various system calls in ways that introduce deadlocks and other concurrency problems that wouldn't occur in normal circumstances. For example, the issue discussed over in golang/go#42528 is likely to affect Terraform versions built with the versions of Go that the issue is discussing.

Antivirus software tends to change its strategies often and vendors are naturally secretive about what exactly they are doing, and so unfortunately there's not really anything we can do to directly address lockups caused by arbitrary code introduced by antivirus software. We do, however, keep up-to-date with the latest Go compiler releases in order to inherit any changes they might make to minimize those situations, and so upgrading to a newer version of Terraform may possibly help, if the problem you've encountered is one that others have encountered with Go software.

We don't really have any way to debug arbitrary antivirus software in order to investigate further. :confounded:

apparentlymart avatar Nov 16 '21 23:11 apparentlymart

Hello all, I'm cleaning up old issues and I see this one seems to have reached an impasse. I am going to close this issue now, please let me know if you believe this action to be taken in error. Thanks!

crw avatar Oct 25 '23 23:10 crw

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Dec 07 '23 02:12 github-actions[bot]