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 during terraform refresh in aws.findResourceSecurityGroup #2431

Closed
mahileeb opened this issue Jun 23, 2015 · 5 comments
Closed

Crash during terraform refresh in aws.findResourceSecurityGroup #2431

mahileeb opened this issue Jun 23, 2015 · 5 comments

Comments

@mahileeb
Copy link

2015/06/23 13:41:27 terraform-provider-aws: panic: runtime error: invalid memory address or nil pointer dereference
2015/06/23 13:41:27 terraform-provider-aws: [signal 0xb code=0x1 addr=0x0 pc=0xd3905]
2015/06/23 13:41:27 terraform-provider-aws: 
2015/06/23 13:41:27 terraform-provider-aws: goroutine 260 [running]:
2015/06/23 13:41:27 terraform-provider-aws: github.com/hashicorp/terraform/builtin/providers/aws.findResourceSecurityGroup(0xc2080374a8, 0xc2083a52b0, 0xb, 0xc2083a52b0, 0x0, 0x0)
2015/06/23 13:41:27 terraform-provider-aws:     /private/tmp/terraform20150607-8328-1c01jkp/terraform-0.5.3/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_security_group_rule.go:262 +0x3a5
2015/06/23 13:41:27 terraform-provider-aws: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsSecurityGroupRuleRead(0xc2082ab740, 0x54e5c0, 0xc208010cb0, 0x0, 0x0)
2015/06/23 13:41:27 terraform-provider-aws:     /private/tmp/terraform20150607-8328-1c01jkp/terraform-0.5.3/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_security_group_rule.go:144 +0xfb
2015/06/23 13:41:27 terraform-provider-aws: github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc208168340, 0xc208360cc0, 0x54e5c0, 0xc208010cb0, 0xc208135290, 0x0, 0x0)
2015/06/23 13:41:27 terraform-provider-aws:     /private/tmp/terraform20150607-8328-1c01jkp/terraform-0.5.3/src/github.com/hashicorp/terraform/helper/schema/resource.go:209 +0x475
2015/06/23 13:41:27 terraform-provider-aws: github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc208182900, 0xc208168ec0, 0xc208360cc0, 0x54f940, 0x0, 0x0)
2015/06/23 13:41:27 terraform-provider-aws:     /private/tmp/terraform20150607-8328-1c01jkp/terraform-0.5.3/src/github.com/hashicorp/terraform/helper/schema/provider.go:180 +0x1c7
2015/06/23 13:41:27 terraform-provider-aws: github.com/hashicorp/terraform/rpc.(*ResourceProviderServer).Refresh(0xc20816af40, 0xc2083a5100, 0xc2083a5380, 0x0, 0x0)
2015/06/23 13:41:27 terraform-provider-aws:     /private/tmp/terraform20150607-8328-1c01jkp/terraform-0.5.3/src/github.com/hashicorp/terraform/rpc/resource_provider.go:341 +0x73
2015/06/23 13:41:27 terraform-provider-aws: reflect.Value.call(0x661160, 0x7a3780, 0x13, 0x7f66e0, 0x4, 0xc20848ff28, 0x3, 0x3, 0x0, 0x0, ...)
2015/06/23 13:41:27 terraform-provider-aws:     /usr/local/Cellar/go/1.4.2/libexec/src/reflect/value.go:419 +0x10e5
2015/06/23 13:41:27 terraform-provider-aws: reflect.Value.Call(0x661160, 0x7a3780, 0x13, 0xc20848ff28, 0x3, 0x3, 0x0, 0x0, 0x0)
2015/06/23 13:41:27 terraform-provider-aws:     /usr/local/Cellar/go/1.4.2/libexec/src/reflect/value.go:296 +0xbc
2015/06/23 13:41:27 terraform-provider-aws: net/rpc.(*service).call(0xc208168740, 0xc208168700, 0xc208079c00, 0xc2080a3080, 0xc2083a9dc0, 0x54f8e0, 0xc2083a5100, 0x16, 0x54f940, 0xc2083a5380, ...)
2015/06/23 13:41:27 terraform-provider-aws:     /usr/local/Cellar/go/1.4.2/libexec/src/net/rpc/server.go:382 +0x1f7
2015/06/23 13:41:27 terraform-provider-aws: created by net/rpc.(*Server).ServeCodec
2015/06/23 13:41:27 terraform-provider-aws:     /usr/local/Cellar/go/1.4.2/libexec/src/net/rpc/server.go:476 +0x44a

Full log
https://www.dropbox.com/s/ou91p0ss9k2t2cb/crash.log?dl=0

@mahileeb
Copy link
Author

The previous apply failed with:

Error applying plan:

12 error(s) occurred:

* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.35.160:22: i/o timeout
* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.11.57:22: i/o timeout
* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.40.244:22: i/o timeout
* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.1.4:22: i/o timeout
* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.35.180:22: i/o timeout
* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.30.48:22: i/o timeout
* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.30.53:22: i/o timeout
* 1 error(s) occurred:

* 1 error(s) occurred:

* dial tcp 10.14.12.228:22: i/o timeout
* 1 error(s) occurred:

* Resource 'aws_elb.live_lcds_elb' does not have attribute 'id' for variable 'aws_elb.live_lcds_elb.id'
* 1 error(s) occurred:

* Resource 'aws_elb.live_lcds_elb' does not have attribute 'id' for variable 'aws_elb.live_lcds_elb.id'
* 1 error(s) occurred:

* Resource 'aws_elb.demo_lcds_elb' does not have attribute 'id' for variable 'aws_elb.demo_lcds_elb.id'
* 1 error(s) occurred:

* Resource 'aws_elb.demo_lcds_elb' does not have attribute 'id' for variable 'aws_elb.demo_lcds_elb.id'

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

So perhaps related to state file missing some computed fields like Ids?

phinze added a commit that referenced this issue Jun 23, 2015
Fixes crash in #2431

Decided that `findResourceSecurityGroup` should return an error when
the SG is not found, since the callers cannot happily continue with a
`nil` SG

Also passes through a few error cases that were being swallowed.

/cc @catsby
@phinze
Copy link
Contributor

phinze commented Jun 23, 2015

Thanks for the report - the crash should be handled in #2434.

That previous apply looks like it had some sort of connectivity problem - were you hoping to address that in this issue too, or was this mostly about the crash?

@mahileeb
Copy link
Author

The connectivity issues could probably be better reported (we were having wifi issues at the time) but the main issue was the crash.

@phinze
Copy link
Contributor

phinze commented Jun 23, 2015

Sounds good. Will close this since #2434 takes care of the crash. Feel free to file another issue if you have ideas around better messaging for connectivity problems.

@ghost
Copy link

ghost commented May 2, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants