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

Crash Report: terraform apply causes crash #5326

Closed
ghost opened this issue Jul 25, 2018 · 4 comments · Fixed by #5327
Closed

Crash Report: terraform apply causes crash #5326

ghost opened this issue Jul 25, 2018 · 4 comments · Fixed by #5327
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ses Issues and PRs that pertain to the ses service.
Milestone

Comments

@ghost
Copy link

ghost commented Jul 25, 2018

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


Terraform Version

Terraform v0.11.7
provider.aws v1.28.0

Terraform Configuration Files

https://gist.github.com/elsdrium/9f24251bdd868d282519aa6a79fbd50c
https://gist.github.com/elsdrium/39ef67812a9fa0b2bce3611963742e0c
https://gist.github.com/elsdrium/c07907378a745414c3b5b3a3a6a84b21

Crash Output

https://gist.github.com/elsdrium/b088d031420f6a32b6931b813c316a53

Expected Behavior

terraform apply succeeded or failed

Actual Behavior

terraform crashed

Steps to Reproduce

  1. terraform init
  2. terraform apply -var-file=example.tfvars
  3. terraform apply -var-file=example.tfvars

Then terraform crashed at the second applying

@bflad bflad added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ses Issues and PRs that pertain to the ses service. labels Jul 25, 2018
@bflad
Copy link
Contributor

bflad commented Jul 25, 2018

Hi @elsdrium 👋 Thanks for reporting this and sorry you are running into trouble here.

It seems like we are missing a check to ensure that the SES API actually returned notification attributes in this case. I can get a quick pull request together which should prevent this from crashing and instead report that the topic_arn is empty during read.

Relevant portion of crash log:

2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: panic: runtime error: invalid memory address or nil pointer dereference
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x215bcac]
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: 
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: goroutine 146 [running]:
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsSesNotificationTopicRead(0xc4201bba40, 0x29f70a0, 0xc420242900, 0xc4201bba40, 0x0)
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: 	/opt/teamcity-agent/work/770c7f58f3da7bdc/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_identity_notification_topic.go:97 +0x3ec
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc4203313b0, 0xc42095c190, 0x29f70a0, 0xc420242900, 0xc420486190, 0xc420932c01, 0x80000000018)
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: 	/opt/teamcity-agent/work/770c7f58f3da7bdc/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:352 +0x17e
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc4201d0a80, 0xc42095c140, 0xc42095c190, 0x7ff42ccbad90, 0x0, 0x25bd3a0)
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: 	/opt/teamcity-agent/work/770c7f58f3da7bdc/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:308 +0x9a
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc4206c7040, 0xc4204750e0, 0xc4204751b0, 0x0, 0x0)
2018-07-25T12:22:06.935+0800 [DEBUG] plugin.terraform-provider-aws_v1.28.0_x4: 	/opt/teamcity-agent/work/770c7f58f3da7bdc/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:549 +0x4e

@bflad
Copy link
Contributor

bflad commented Jul 25, 2018

The fix for the crash has been merged into master and will release with version 1.29.0 of the AWS provider, likely later today.

@bflad
Copy link
Contributor

bflad commented Jul 26, 2018

This has been released in version 1.29.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link
Author

ghost commented Apr 4, 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 4, 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. service/ses Issues and PRs that pertain to the ses service.
Projects
None yet
1 participant