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

stdout: error="read |0: file already closed #35667

Open
DavidHermes opened this issue Sep 3, 2024 · 4 comments
Open

stdout: error="read |0: file already closed #35667

DavidHermes opened this issue Sep 3, 2024 · 4 comments
Labels
bug new new issue not yet triaged waiting-response An issue/pull request is waiting for a response from the community

Comments

@DavidHermes
Copy link

DavidHermes commented Sep 3, 2024

Terraform Version

1.9.0 - 1.9.5 (Linux AMD64)

Terraform Configuration Files

terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.116.0"
}
random = {
source = "hashicorp/random"
version = "3.3.1"
}
}

backend "azurerm" {}
}

provider "azurerm" {
subscription_id = var.subscription_id
features {}
}

resource "azurerm_resource_group" "test" {

name = "TEST-RG"
location = "North Europe"

}

provider "random" {}

Debug Output

[ERROR] provider: error encountered while scanning stdout: error="read |0: file already closed

Expected Behavior

Normal deployment

Actual Behavior

This Error does not occur on every deployment but in about 30% of all cases.

Does not occur with terraform 1.8.5

Steps to Reproduce

1.terraform init
2. terraform plan
3. terraform apply

Additional Context

No response

References

A simliar Issue;
hashicorp/go-plugin#116

@DavidHermes DavidHermes added bug new new issue not yet triaged labels Sep 3, 2024
@jbardin
Copy link
Member

jbardin commented Sep 3, 2024

Hi @DavidHermes,

That isn't a user-facing error from Terraform, are you experiencing a problem with Terraform planning or applying the configuration?

@jbardin jbardin added the waiting-response An issue/pull request is waiting for a response from the community label Sep 3, 2024
@DavidHermes
Copy link
Author

DavidHermes commented Sep 13, 2024

It happens when applying a configuration.

@hingst
Copy link

hingst commented Sep 13, 2024

I can confirm that this issue happens in some deployments. It seems to happen randomly, sometimes I get this error, but then re-running terraform apply with the same exact configuration works. Platform is Ubuntu x64.

This started happening after a recent Terraform update, but I can't pinpoint the exact version. It does not seem to be provider-related, as downgrading to an older Terraform version (1.6.x in my case) fixes it.

@jbardin
Copy link
Member

jbardin commented Sep 17, 2024

Hello, the question we're waiting on is if there is an error reported by Terraform in the UI, or if Terraform is not behaving correctly. The log message above is not intended for the end user, it is probably an erroneous log message from an upstream library, but I'd like to rule out any possible Terraform issues before sending this over to other maintainers.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new new issue not yet triaged waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

No branches or pull requests

3 participants