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 Crash with AWS aws_kinesis_firehose_delivery_stream at destination RedShift #3048

Closed
hashibot opened this issue Jan 18, 2018 · 3 comments
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/firehose Issues and PRs that pertain to the firehose service.
Milestone

Comments

@hashibot
Copy link

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


Hello There,

I get terraform crash issue at aws_kinesis_firehose_delivery_stream (destination - redshift).

panic: runtime error: invalid memory address or nil pointer dereference

Terraform Version

Terraform v0.11.2

Terraform Configuration Files

resource "aws_kinesis_firehose_delivery_stream" "lead_distributions_to_redshift" {
  name        = "${var.environment_identifier}-leaddelivery-lead-distributions"
  destination = "redshift"

  s3_configuration {
    role_arn           = "${aws_iam_role.firehose_role.arn}"
    bucket_arn         = "${aws_s3_bucket.firehose_lead_distributions.arn}"
    buffer_size        = 10
    buffer_interval    = 60
  }

  redshift_configuration {
    role_arn           = "${aws_iam_role.firehose_role.arn}"
    cluster_jdbcurl    = "jdbc:redshift://${var.warehouse_endpoint}/${var.warehouse_database_name}"
    username           = "${var.warehouse_master_user_name}"
    password           = "${var.warehouse_master_password}"
    data_table_name    = "${var.warehouse_lead_delivery_schema}.lead_distributions"
    retry_duration     = 600
    copy_options       = "json 'auto' region '${var.region}'"
    cloudwatch_logging_options {
      enabled = "true"
      log_group_name = "${aws_cloudwatch_log_group.delivery_firehose_log_group.name}"
      log_stream_name = "${aws_cloudwatch_log_stream.lead_distributions_to_redshift_log_stream.name}"
    }
  }
}

Debug Output

Crash Output

* aws_kinesis_firehose_delivery_stream.lead_distributions_to_redshift: 1 error(s) occurred:

* aws_kinesis_firehose_delivery_stream.lead_distributions_to_redshift: unexpected EOF

Steps to Reproduce

Please list the full steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform apply
@hashibot hashibot added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Jan 18, 2018
@radeksimko radeksimko added this to the v1.7.1 milestone Jan 18, 2018
@radeksimko radeksimko self-assigned this Jan 18, 2018
@radeksimko radeksimko added the service/firehose Issues and PRs that pertain to the firehose service. label Jan 18, 2018
@radeksimko
Copy link
Member

Hi @PavanDevOps
thanks for the report.

I managed to reproduce it and I can confirm this is a duplicate of #3006 which was fixed in #2970 and will be part of the next release (most likely tomorrow) 1.7.1.

Attached is snippet from the crash log:

panic: runtime error: invalid memory address or nil pointer dereference
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x27cebbf]
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws:
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: goroutine 500 [running]:
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: github.com/terraform-providers/terraform-provider-aws/aws.flattenKinesisFirehoseDeliveryStream(0xc4209ee3f0, 0xc420ff29c0, 0xc420f860e8, 0x0)
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: 	/Users/radeksimko/gopath/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:244 +0x161f
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStreamRead(0xc4209ee3f0, 0x3085180, 0xc420202a00, 0x2c90c40, 0xc42077c1e0)
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: 	/Users/radeksimko/gopath/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1262 +0x323
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStreamCreate(0xc4209ee3f0, 0x3085180, 0xc420202a00, 0xc4209ee3f0, 0x0)
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: 	/Users/radeksimko/gopath/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1159 +0x9c1
2018-01-18T11:05:23.629Z [DEBUG] plugin.terraform-provider-aws: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc420eeee70, 0xc420962690, 0xc420815880, 0x3085180, 0xc420202a00, 0x1, 0xc4207dec30, 0xc4203642a0)
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: 	/Users/radeksimko/gopath/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:227 +0x364
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc4207aad20, 0xc420962640, 0xc420962690, 0xc420815880, 0x5dac458, 0x0, 0xc4204a96a8)
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: 	/Users/radeksimko/gopath/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:283 +0xa4
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc4206fe300, 0xc420815820, 0xc420b430a0, 0x0, 0x0)
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: 	/Users/radeksimko/gopath/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:527 +0x57
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: reflect.Value.call(0xc42035c960, 0xc4203658b8, 0x13, 0x346b76a, 0x4, 0xc4207f3f20, 0x3, 0x3, 0x10054e3, 0xc420147500, ...)
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: 	/usr/local/Cellar/go/1.9.2/libexec/src/reflect/value.go:434 +0x905
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: reflect.Value.Call(0xc42035c960, 0xc4203658b8, 0x13, 0xc42037e720, 0x3, 0x3, 0x0, 0x0, 0x0)
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: 	/usr/local/Cellar/go/1.9.2/libexec/src/reflect/value.go:302 +0xa4
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: net/rpc.(*service).call(0xc420eae2c0, 0xc4206b6500, 0xc42078d008, 0xc420177700, 0xc4206fe880, 0x2c0f820, 0xc420815820, 0x16, 0x2c0f860, 0xc420b430a0, ...)
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: 	/usr/local/Cellar/go/1.9.2/libexec/src/net/rpc/server.go:381 +0x142
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: created by net/rpc.(*Server).ServeCodec
2018-01-18T11:05:23.630Z [DEBUG] plugin.terraform-provider-aws: 	/usr/local/Cellar/go/1.9.2/libexec/src/net/rpc/server.go:475 +0x36b

@pke0108
Copy link

pke0108 commented Jan 19, 2018

@radeksimko Thank you for the update.

@ghost
Copy link

ghost commented Apr 8, 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 Apr 8, 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/firehose Issues and PRs that pertain to the firehose service.
Projects
None yet
Development

No branches or pull requests

3 participants