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 crashes running in Docker #14542

Closed
ghost opened this issue Aug 10, 2020 · 4 comments · Fixed by #14590
Closed

Terraform crashes running in Docker #14542

ghost opened this issue Aug 10, 2020 · 4 comments · Fixed by #14590
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/acm Issues and PRs that pertain to the acm service.
Milestone

Comments

@ghost
Copy link

ghost commented Aug 10, 2020

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


Terraform Version

/ # terraform --version
Terraform v0.12.29
+ provider.aws v3.0.0
+ provider.null v2.1.

Terraform Configuration Files

Probably irrelevant in this case (see Additional Context below), there's nothing fancy going on.

Debug/Crash Output

https://gist.github.com/steadysupply/3ab2d98bb5a69a425507d31374a5dad8
The above contains crash.log and the stdout/stderr files produced by the invocation

/ # TF_LOG=trace aws-profile -p abc-xyz terraform apply /mnt/repo/terraform > stdout 2
> stderr

. These files are encrypted with GPG using security@hashicorp.com pubkey.

Expected Behavior

Normal apply run

Actual Behavior

It crashed!

Steps to Reproduce

Run apply

Additional Context

We're running Terraform in the root of a Docker container where the repository containing our templates gets mounted read only at /mnt/repo, a named volume (read/write) is mounted at /.terraform to cache providers and plugins (OS is Ubuntu 20.04 with Docker 19.03.8). We're also using the Python script aws-profile to set AWS credentials in the environment (see invocation above).

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 10, 2020
@bflad bflad added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/acm Issues and PRs that pertain to the acm service. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 10, 2020
@bflad
Copy link
Contributor

bflad commented Aug 10, 2020

Stacktrace from original issue:

 panic: runtime error: invalid memory address or nil pointer dereference
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x37f72e7]
 
 goroutine 61 [running]:
 github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsAcmCertificateCheckValidationRecords(0xc0016e0710, 0x1, 0x1, 0xc0010ef9e0, 0xc0002126c8, 0x1, 0x4b10100)
 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go:138 +0x197
 github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsAcmCertificateValidationCreate(0xc0004bf570, 0x4c948a0, 0xc0003af900, 0x2, 0x94466a0)
 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate_validation.go:61 +0x3bd
 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc0002aabd0, 0xc0013956d0, 0xc0013d8900, 0x4c948a0, 0xc0003af900, 0x4b10101, 0xc0013992b8, 0xc0013de510)
 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:310 +0x365

@anGie44
Copy link
Contributor

anGie44 commented Aug 12, 2020

The fix for this has been merged and will release with v3.2.0 of the Terraform AWS Provider.

@ghost
Copy link
Author

ghost commented Aug 14, 2020

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link
Author

ghost commented Sep 12, 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 Sep 12, 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/acm Issues and PRs that pertain to the acm service.
Projects
None yet
2 participants