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

Terraform Provider Null Crashed #244

Open
1 task done
grahamschuckman opened this issue Jul 20, 2023 · 2 comments
Open
1 task done

Terraform Provider Null Crashed #244

grahamschuckman opened this issue Jul 20, 2023 · 2 comments
Assignees
Labels
bug waiting-response Issues or pull requests waiting for an external response

Comments

@grahamschuckman
Copy link

Terraform CLI and Provider Versions

Terraform v1.4.6 on linux_amd64

Terraform Configuration

NA

Expected Behavior

Plan to succeed.

Actual Behavior

Plan failed with GRPC provider crashing.

Steps to Reproduce

  1. if [ "${TERRAFORM_PLAN}" == "false" && "${TERRAFORM_NO_PLAN}" == "true" ]; then echo "############################################################" echo "# PLAN NOT RUN #" echo "# EXERCISE CAUTION #" echo "############################################################" else terraform plan -no-color $FLAG_REFRESH $PARALLELISM $TARGET fi

How much impact is this issue causing?

Medium

Logs

https://gist.github.com/grahamschuckman/04691d286d2e0e20774fc34ae5239b56

Additional Information

We have been encountering regular problems with the GRPC plugin timing out during a plan, but this is the first instance we've seen of the crash output.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@grahamschuckman
Copy link
Author

For context: we were running this on AWS CodeBuild using the image: aws/codebuild/amazonlinux2-x86_64-standard:4.0. We have 15 GB memory, 8 vCPUs on the build.

@austinvalle
Copy link
Member

austinvalle commented Jul 31, 2023

Hi there @grahamschuckman 👋🏻 , thanks for reporting this and sorry you're running into this issue.

At first glance I don't see anything that points to a bug in the Terraform null provider itself, this seems more likely to be resource constraints on the CI machine, which is highly dependent on your configuration setup. In terms of where the resource limitation is happening, the debug output you provided points to an RPC (ValidateResourceConfig) that is called during the first stages of terraform plan which is validation.

In theory, you'd get the same resource limitation error reported by running just terraform validate if that was the actual problem. However, if there are multiple processes running on the AWS CodeBuild machine, that resource limitation could happen at any part during the terraform plan process as it makes multiple RPC calls, the validation RPC just happens to be the one reporting the error with a crash.

Are you able to isolate the null provider and reproduce the crashes with a smaller terraform config? Without more context, I don't think we'll be able to provide useful help outside of an "increase the amount of memory on the machine" tip, which doesn't feel helpful 🙁

Reference for other providers running into this problem: hashicorp/terraform-provider-aws#20274

@austinvalle austinvalle added waiting-response Issues or pull requests waiting for an external response and removed tf-devex-triage labels Jul 31, 2023
@github-actions github-actions bot removed the waiting-response Issues or pull requests waiting for an external response label Jul 31, 2023
@austinvalle austinvalle added the waiting-response Issues or pull requests waiting for an external response label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug waiting-response Issues or pull requests waiting for an external response
Projects
None yet
Development

No branches or pull requests

3 participants