Terraform-provider-aws: Terraform Crashes

Created on 17 Jan 2020  ·  4Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

  • Terraform Version: 0.12.19
  • AWS Provider: 2.44

Affected Resource(s)

Terraform Configuration Files

Debug Output

Panic Output

panic: runtime error: invalid memory address or nil pointer dereference
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3a74541]
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: 
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: goroutine 5030 [running]:
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsLbListenerRead(0xc0000bfe30, 0x41b45c0, 0xc0000c6000, 0xc0000bfe30, 0x0)
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go:549 +0x261
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0007a6080, 0xc0012c8e10, 0x41b45c0, 0xc0000c6000, 0xc000ef2090, 0xc0012c8e10, 0x0)
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/helper/schema/resource.go:455 +0x119
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc00015c828, 0x5c4f280, 0xc000e270e0, 0xc0012c8d20, 0xc00015c828, 0xc000e270e0, 0xc000927a80)
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:525 +0x3d8
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0x51ffc80, 0xc00015c828, 0x5c4f280, 0xc000e270e0, 0xc000f5e3c0, 0x0, 0x5c4f280, 0xc000e270e0, 0xc00084ce00, 0x33e)
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3153 +0x217
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003d6000, 0x5c70d20, 0xc000089800, 0xc00010e100, 0xc0007a3350, 0x8a1c4f0, 0x0, 0x0, 0x0)
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:995 +0x460
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: google.golang.org/grpc.(*Server).handleStream(0xc0003d6000, 0x5c70d20, 0xc000089800, 0xc00010e100, 0x0)
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1275 +0xd97
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00014e000, 0xc0003d6000, 0x5c70d20, 0xc000089800, 0xc00010e100)
2020-01-17T17:03:42.098Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:710 +0xbb
2020-01-17T17:03:42.098Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-01-17T17:03:42.098Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:708 +0xa1
2020-01-17T17:03:42.100Z [DEBUG] plugin: plugin process exited: path=/mnt/jenkins/workspace/vOps_Terraform_tf-nonprod_master/us-east-1/qa/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.44.0_x4 pid=4388 error="exit status 2"
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [TRACE] [walkRefresh] Exiting eval tree: aws_lb_listener.<redacted>
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [TRACE] [walkRefresh] Exiting eval tree: aws_lb_listener.<redacted>
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [TRACE] [walkRefresh] Exiting eval tree: aws_lb_target_group.<redacted>
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": dynamic subgraph encountered errors
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] [walkRefresh] Exiting eval tree: aws_lb_listener.<redacted>
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_certificate.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] [walkRefresh] Exiting eval tree: aws_lb_listener.<redacted>
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": dynamic subgraph encountered errors
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_certificate.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": dynamic subgraph encountered errors
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_certificate.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_target_group.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_target_group.<redacted>": dynamic subgraph encountered errors
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_target_group.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_certificate.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": dynamic subgraph encountered errors
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_rule.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "module.<redacted>.var.lb_target_group_arn" errored, so skipping
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_certificate.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "module.<redacted>.aws_ecs_service.sr_ecs_service" errored, so skipping
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_rule.<redacted>" errored, so skipping
2020/01/17 17:03:42 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/01/17 17:03:42 [TRACE] [walkRefresh] Exiting eval tree: aws_lb_listener.<redacted>
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "module.<redacted>.output.service_id" errored, so skipping
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": dynamic subgraph encountered errors
2020/01/17 17:03:42 [TRACE] vertex "aws_lb_listener.<redacted>": visit complete
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_certificate.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "aws_lb_listener_rule.<redacted>" errored, so skipping
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "provider.aws (close)" errored, so skipping
2020/01/17 17:03:42 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020-01-17T17:03:42.181Z [DEBUG] plugin: plugin exited

Expected Behavior

Actual Behavior

Frequent crashes with:

panic: runtime error: invalid memory address or nil pointer dereference
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3a74541]
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: 
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: goroutine 5030 [running]:
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsLbListenerRead(0xc0000bfe30, 0x41b45c0, 0xc0000c6000, 0xc0000bfe30, 0x0)
2020-01-17T17:03:42.097Z [DEBUG] plugin.terraform-provider-aws_v2.44.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go:549 +0x261

Steps to Reproduce

Terraform apply

  1. terraform apply

Important Factoids

  • The module here has quite a bit of lb listeners / the dir has a lot of tf files

References

  • #0000
bug crash servicelbv2

Most helpful comment

This appears to be a subtle logic bug where some final retry logic for API throttling was not resetting the response object. Thank you very much for including this mention in the original report. 👍

The module here has quite a bit of lb listeners

Fix submitted here: https://github.com/terraform-providers/terraform-provider-aws/pull/12617

All 4 comments

This appears to be a subtle logic bug where some final retry logic for API throttling was not resetting the response object. Thank you very much for including this mention in the original report. 👍

The module here has quite a bit of lb listeners

Fix submitted here: https://github.com/terraform-providers/terraform-provider-aws/pull/12617

The fix for this has been merged and will release with version 2.60.0 of the Terraform AWS Provider, later this week.

This has been released in version 2.60.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!

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!

Was this page helpful?
0 / 5 - 0 ratings