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 when refreshing state for AWS SES #7862

Closed
ghost opened this issue Mar 8, 2019 · 4 comments · Fixed by #7883
Closed

Crash when refreshing state for AWS SES #7862

ghost opened this issue Mar 8, 2019 · 4 comments · Fixed by #7883
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 Mar 8, 2019

This issue was originally opened by @victor-pedro-massive as hashicorp/terraform#20610. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.11.11
+ provider.aws v2.0.0

Terraform Configuration Files

data "aws_route53_zone" "password-reset-processor-zone" {
  name = "${var.ses_domain}"
}
# ...
resource "aws_ses_domain_dkim" "service-password-reset-email-processor" {
  domain = "${aws_ses_domain_identity.service-password-reset-email-processor.domain}"
}
# ...
resource "aws_ses_domain_mail_from" "service-password-reset-email-processor" {
  domain           = "${aws_ses_domain_identity.service-password-reset-email-processor.domain}"
  mail_from_domain = "${var.ses_subdomain}.${aws_ses_domain_identity.service-password-reset-email-processor.domain}"
}

Debug Output

https://gist.github.com/victor-pedro-massive/a1365122eb4148d458617ee3a78bc100

Crash Output

https://gist.github.com/victor-pedro-massive/aa706f311682ebd5bddcb29317c7a92a

Expected Behavior

It should refresh state or throw an defined error.

Actual Behavior

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Steps to Reproduce

terraform init
terraform refresh -var "stage=$ENV" -var "version=$PACKAGE_VERSION" --var-file default.tfvars --var-file $ENV.tfvars

Additional Context

None.

References

@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 Mar 8, 2019
bflad added a commit that referenced this issue Mar 10, 2019
…ain Identity

Reference: #7862

Output from acceptance testing before code update:

```
=== CONT  TestAccAWSSESDomainMailFrom_disappears_Identity
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3e051ac]

goroutine 415 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsSesDomainMailFromRead(0xc0009825b0, 0x4a444a0, 0xc0004cec00, 0xc0009825b0, 0x0)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go:87 +0x37c
```

Output from acceptance testing:

```
--- PASS: TestAccAWSSESDomainIdentity_disappears (9.03s)
--- PASS: TestAccAWSSESDomainMailFrom_disappears_Identity (10.38s)
--- PASS: TestAccAWSSESDomainMailFrom_disappears (13.55s)
--- PASS: TestAccAWSSESDomainMailFrom_behaviorOnMxFailure (21.04s)
--- PASS: TestAccAWSSESDomainMailFrom_basic (21.11s)
```
@bflad
Copy link
Contributor

bflad commented Mar 10, 2019

Relevant portion of crash log:


2019-03-07T19:59:42.695-0300 [DEBUG] plugin.terraform-provider-aws_v2.0.0_x4: panic: runtime error: invalid memory address or nil pointer dereference
2019-03-07T19:59:42.695-0300 [DEBUG] plugin.terraform-provider-aws_v2.0.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2998b8f]
2019-03-07T19:59:42.695-0300 [DEBUG] plugin.terraform-provider-aws_v2.0.0_x4: 
2019-03-07T19:59:42.695-0300 [DEBUG] plugin.terraform-provider-aws_v2.0.0_x4: goroutine 106 [running]:
2019-03-07T19:59:42.695-0300 [DEBUG] plugin.terraform-provider-aws_v2.0.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsSesDomainMailFromRead(0xc0001eae70, 0x2e15ee0, 0xc000261c00, 0xc0001eae70, 0x0)
2019-03-07T19:59:42.695-0300 [DEBUG] plugin.terraform-provider-aws_v2.0.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go:87 +0x3bf

Fix submitted: #7883

nywilken pushed a commit that referenced this issue Mar 14, 2019
…ain Identity (#7883)

Reference: #7862

Output from acceptance testing before code update:

```
=== CONT  TestAccAWSSESDomainMailFrom_disappears_Identity
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3e051ac]

goroutine 415 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsSesDomainMailFromRead(0xc0009825b0, 0x4a444a0, 0xc0004cec00, 0xc0009825b0, 0x0)
	/Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_domain_mail_from.go:87 +0x37c
```

Output from acceptance testing:

```
--- PASS: TestAccAWSSESDomainIdentity_disappears (9.03s)
--- PASS: TestAccAWSSESDomainMailFrom_disappears_Identity (10.38s)
--- PASS: TestAccAWSSESDomainMailFrom_disappears (13.55s)
--- PASS: TestAccAWSSESDomainMailFrom_behaviorOnMxFailure (21.04s)
--- PASS: TestAccAWSSESDomainMailFrom_basic (21.11s)
```
@nywilken
Copy link
Contributor

Fix merged in #7883

@bflad bflad added this to the v2.2.0 milestone Mar 15, 2019
@bflad
Copy link
Contributor

bflad commented Mar 15, 2019

This has been released in version 2.2.0 of the Terraform 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 Mar 31, 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 Mar 31, 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
2 participants