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 Plan runtime error #1577

Closed
hashibot opened this issue Sep 3, 2017 · 6 comments
Closed

Terraform Plan runtime error #1577

hashibot opened this issue Sep 3, 2017 · 6 comments
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic.

Comments

@hashibot
Copy link

hashibot commented Sep 3, 2017

This issue was originally opened by @opteemister as hashicorp/terraform#16004. It was migrated here as a result of the provider split. The original body of the issue is below.


Hello. Since version 0.10.0 I see runtime error on our configuration. And even in 0.10.3 it wasn't fixed, so I decided to report it. Unfortunately I can't attach configuration files. But there are a lot of AWS resources inside it.

Terraform Version

Terraform v0.10.3

Debug Output

There is a huge Debug output like this (other lines are very similar to this block):

Error refreshing state: 108 error(s) occurred:

* module.data_quality_run_all_celr.aws_cloudwatch_event_rule.cron_lambda_event: 1 error(s) occurred:

* module.data_quality_run_all_celr.aws_cloudwatch_event_rule.cron_lambda_event: aws_cloudwatch_event_rule.cron_lambda_event: connection is shut down
* module.asset_onboarding_queue_from_asset_onboarding_data_lambda.module.lambda_logging.aws_cloudwatch_log_group.lambda_log_group: 1 error(s) occurred:

* module.asset_onboarding_queue_from_asset_onboarding_data_lambda.module.lambda_logging.aws_cloudwatch_log_group.lambda_log_group: aws_cloudwatch_log_group.lambda_log_group: connection is shut down
* aws_dynamodb_table.basic-dynamodb-table: 84 error(s) occurred:

Crash Output

panic: runtime error: invalid memory address or nil pointer dereference
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x23a327f]
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4:
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: goroutine 2784 [running]:
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3BucketRead(0xc4322b8770, 0x299be00, 0xc42cc67600, 0x0, 0x40045e0)
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go:787 +0x1b3f
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc42ceb65a0, 0xc4322a58b0, 0x299be00, 0xc42cc67600, 0xc42c15c0a8, 0xc42f067301, 0xc428f83a88)
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:320 +0x21d
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc42cd4ec40, 0xc4322a5860, 0xc4322a58b0, 0x4a04e10, 0x0, 0xc431cfd380)
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:267 +0x91
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc42cda89e0, 0xc4322af770, 0xc4322afca0, 0x0, 0x0)
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:510 +0x4e
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: reflect.Value.call(0xc42038ff20, 0xc42cae2bc8, 0x13, 0x2c7773a, 0x4, 0xc428f83f20, 0x3, 0x3, 0x11, 0x0, ...)
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/usr/local/go/src/reflect/value.go:434 +0x91f
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: reflect.Value.Call(0xc42038ff20, 0xc42cae2bc8, 0x13, 0xc42e1d1720, 0x3, 0x3, 0x112d940, 0x3faf560, 0xc4323f9e00)
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/usr/local/go/src/reflect/value.go:302 +0xa4
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: net/rpc.(*service).call(0xc42cdb4500, 0xc42cdb44c0, 0xc42cebe268, 0xc42cc61300, 0xc43240fa40, 0x2648b60, 0xc4322af770, 0x16, 0x2648ba0, 0xc4322afca0, ...)
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/usr/local/go/src/net/rpc/server.go:387 +0x144
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: created by net/rpc.(*Server).ServeCodec
2017-09-02T14:21:10.241+0300 [DEBUG] plugin.terraform-provider-aws_v0.1.3_x4: 	/usr/local/go/src/net/rpc/server.go:481 +0x404

Expected Behavior

terraform plan should works without errors

Actual Behavior

Runtime error

Steps to Reproduce

  1. terraform init
  2. terraform plan

Important Factoids

We used wrapper script to split configurations by environments (but there is the same behaviour if I run just terraform plan with necessary var-files):
terraform $command -var-file=common.tfvars -var-file=common.secrets.tfvars -var-file=$stack.tfvars -var-file=$stack.secrets.tfvars -state=$stack.tfstate $@

@hashibot hashibot added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Sep 3, 2017
@opteemister
Copy link
Contributor

Can anyone look at this?

@Ninir
Copy link
Contributor

Ninir commented Sep 12, 2017

Hi @opteemister,

Can you provide the exact Terraform configuration you are using minus secrets along with the debug logs?
This would help understand, reproduce and help fixing the issue.

Thanks! 👍

@opteemister
Copy link
Contributor

Hi, @Ninir.

Unfortunately I can't attach exact Terraform configuration. It is very huge and complex and I can easily miss any secrets in there. Sorry for that

I already attached "The most interesting part of a crash log"

@radeksimko
Copy link
Member

Hi folks,
based on the crash log (pointing to https://github.com/terraform-providers/terraform-provider-aws/blob/27d395a764e0f0a46db8855101286a145d6b487f/aws/resource_aws_s3_bucket.go#L787) it looks like it is a duplicate #1314 which was already fixed via #1316 which in turn was shipped as part of v0.1.4 of this provider.

For that reason I'm going to close this issue, but do let us know if it reappears after upgrading to 0.1.4+.

Thanks.

@opteemister
Copy link
Contributor

opteemister commented Sep 27, 2017

Yes, that was fixed. Thank you so much. Checked with version 1.0

@ghost
Copy link

ghost commented Apr 11, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic.
Projects
None yet
Development

No branches or pull requests

4 participants