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 in v0.6.0 - resourceAwsSecurityGroupRuleRead #2593

Closed
jjshoe opened this issue Jul 1, 2015 · 4 comments · Fixed by #2897
Closed

Crash in v0.6.0 - resourceAwsSecurityGroupRuleRead #2593

jjshoe opened this issue Jul 1, 2015 · 4 comments · Fixed by #2897

Comments

@jjshoe
Copy link

jjshoe commented Jul 1, 2015

Ran: terraform plan -state=/home/jjshoe/devops-deploy/bin/../terraform/state/ami01.tfstate -var-file=/home/jjshoe/devops-deploy/bin/../terraform/vars/ami01.tfvars /home/jjshoe/devops-deploy/bin/../terraform/ami

https://gist.github.com/jjshoe/69228b75f7844ad6db8c

Note, same call crashed in v0.5.3 as well.

@phinze
Copy link
Contributor

phinze commented Jul 1, 2015

Relevant snippet:

2015/07/01 11:48:21 terraform-provider-aws: panic: runtime error: invalid memory address or nil pointer dereference
2015/07/01 11:48:21 terraform-provider-aws: [signal 0xb code=0x1 addr=0x0 pc=0x5011c9]
2015/07/01 11:48:21 terraform-provider-aws: 
2015/07/01 11:48:21 [DEBUG] vertex root.root: walking
2015/07/01 11:48:21 terraform-provider-aws: goroutine 45 [running]:
2015/07/01 11:48:21 terraform-provider-aws: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsSecurityGroupRuleRead(0xc208053b60, 0xaa67c0, 0xc20805c2d0, 0x0, 0x0)
2015/07/01 11:48:21 terraform-provider-aws:     /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_security_group_rule.go:164 +0xa29
2015/07/01 11:48:21 terraform-provider-aws: github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc20814eb40, 0xc2080f8000, 0xaa67c0, 0xc20805c2d0, 0xc2080441a8, 0x0, 0x0)
2015/07/01 11:48:21 terraform-provider-aws:     /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/resource.go:209 +0x475
2015/07/01 11:48:21 terraform-provider-aws: github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc208124000, 0xc2080e7e80, 0xc2080f8000, 0xaa7c00, 0x0, 0x0)
2015/07/01 11:48:21 terraform-provider-aws:     /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/provider.go:187 +0x1c7
2015/07/01 11:48:21 terraform-provider-aws: github.com/hashicorp/terraform/rpc.(*ResourceProviderServer).Refresh(0xc2081513a0, 0xc20807b900, 0xc20807be50, 0x0, 0x0)
2015/07/01 11:48:21 terraform-provider-aws:     /opt/gopath/src/github.com/hashicorp/terraform/rpc/resource_provider.go:345 +0x73
2015/07/01 11:48:21 terraform-provider-aws: reflect.Value.call(0xc58ba0, 0xe37d00, 0x13, 0xea2fe0, 0x4, 0xc208101f28, 0x3, 0x3, 0x0, 0x0, ...)
2015/07/01 11:48:21 terraform-provider-aws:     /opt/go/src/reflect/value.go:419 +0x10e5
2015/07/01 11:48:21 terraform-provider-aws: reflect.Value.Call(0xc58ba0, 0xe37d00, 0x13, 0xc208101f28, 0x3, 0x3, 0x0, 0x0, 0x0)
2015/07/01 11:48:21 terraform-provider-aws:     /opt/go/src/reflect/value.go:296 +0xbc
2015/07/01 11:48:21 terraform-provider-aws: net/rpc.(*service).call(0xc2080e6380, 0xc2080e6340, 0xc20814cf08, 0xc2080a2b00, 0xc2081513c0, 0xaa7ba0, 0xc20807b900, 0x16, 0xaa7c00, 0xc20807be50, ...)
2015/07/01 11:48:21 terraform-provider-aws:     /opt/go/src/net/rpc/server.go:382 +0x1f7
2015/07/01 11:48:21 terraform-provider-aws: created by net/rpc.(*Server).ServeCodec
2015/07/01 11:48:21 terraform-provider-aws:     /opt/go/src/net/rpc/server.go:476 +0x44a

@phinze phinze changed the title Crash in v0.6.0 Crash in v0.6.0 - resourceAwsSecurityGroupRuleRead Jul 1, 2015
@phinze phinze added the crash label Jul 1, 2015
@jjshoe
Copy link
Author

jjshoe commented Jul 1, 2015

Reproduce:

  1. Create an aws_security_group using terraform
  2. Create an aws_security_group_rule on config: bundle metadata requires global constraints #1 using terraform
  3. Delete the security group using AWS web console
  4. Call terraform plan

Workaround:
Modify the state files by hand to remove all calls to hand removed groups and rules.

@catsby
Copy link
Contributor

catsby commented Jul 30, 2015

Hey @jjshoe – terribly sorry it's taken me so long, but this should be patched in #2897 (specifically, the panic induced by the steps you outline above).

Thanks for writing in!

@ghost
Copy link

ghost commented May 1, 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 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants