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

resource/aws_kinesis_firehose_delivery_stream: Crash #3226

Closed
radeksimko opened this issue Feb 1, 2018 · 6 comments · Fixed by #3301
Closed

resource/aws_kinesis_firehose_delivery_stream: Crash #3226

radeksimko opened this issue Feb 1, 2018 · 6 comments · Fixed by #3301
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

@radeksimko
Copy link
Member

Terraform Version

v1.8.0

Panic Output

terraform plan -target module.firehose-logging.aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.terraform_remote_state.global-infra: Refreshing state...
aws_s3_bucket.logbucket: Refreshing state... (ID: tntdigital-tools-platform-logs)
data.aws_iam_policy_document.firehose-trust-policy-doc: Refreshing state...
aws_iam_role.firehose-role: Refreshing state... (ID: tools-firehose-platform-logs)
data.aws_iam_policy_document.read_from_es: Refreshing state...
aws_elasticsearch_domain.es: Refreshing state... (ID: arn:aws:es:eu-west-1:156776894708:domain/tools-platform-logs)
aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs: Refreshing state... (ID: arn:aws:firehose:eu-west-1:156776894708...ream/tools-platform-logs-public-access)

Error: Error refreshing state: 1 error(s) occurred:

* module.firehose-logging.aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs: 1 error(s) occurred:

* module.firehose-logging.aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs: aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs: unexpected EOF


panic: runtime error: invalid memory address or nil pointer dereference
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x281c493]
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4:
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: goroutine 220 [running]:
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.flattenKinesisFirehoseDeliveryStream(0xc420235110, 0xc4203f7c20, 0xc42051a260, 0x0)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:298 +0x1a3
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStreamRead(0xc420235110, 0x30fe7e0, 0xc420011900, 0xc420235110, 0x0)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1299 +0x323
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc4202e23f0, 0xc4203b0820, 0x30fe7e0, 0xc420011900, 0xc42043d488, 0xe64fe7367e5da201, 0x800992532b3)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:354 +0x17e
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Refresh(0xc4201b90a0, 0xc4203b07d0, 0xc4203b0820, 0x5e9d000, 0x0, 0x0)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:308 +0x9a
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Refresh(0xc420724300, 0xc420659100, 0xc420659290, 0x0, 0x0)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:549 +0x4e
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: reflect.Value.call(0xc420334c60, 0xc42051a048, 0x13, 0x34f7a78, 0x4, 0xc420331f20, 0x3, 0x3, 0x0, 0x0, ...)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/usr/local/go/src/reflect/value.go:434 +0x905
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: reflect.Value.Call(0xc420334c60, 0xc42051a048, 0x13, 0xc420373f20, 0x3, 0x3, 0x0, 0x0, 0x0)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/usr/local/go/src/reflect/value.go:302 +0xa4
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: net/rpc.(*service).call(0xc420186040, 0xc42069c000, 0xc4201720a0, 0xc420162600, 0xc4206ef660, 0x2c733e0, 0xc420659100, 0x16, 0x2c73420, 0xc420659290, ...)
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/usr/local/go/src/net/rpc/server.go:381 +0x142
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: created by net/rpc.(*Server).ServeCodec
2018-02-01T16:55:55.237+0100 [DEBUG] plugin.terraform-provider-aws_v1.8.0_x4: 	/usr/local/go/src/net/rpc/server.go:475 +0x36b
2018/02/01 16:55:55 [ERROR] root.firehose-logging: eval: *terraform.EvalRefresh, err: aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs: unexpected EOF
2018/02/01 16:55:55 [ERROR] root.firehose-logging: eval: *terraform.EvalSequence, err: aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs: unexpected EOF
2018/02/01 16:55:55 [TRACE] [walkRefresh] Exiting eval tree: module.firehose-logging.aws_kinesis_firehose_delivery_stream.firehose-stream-public-access-logs
2018/02/01 16:55:55 [TRACE] dag/walk: upstream errored, not walking "provider.aws (close)"
2018/02/01 16:55:55 [TRACE] dag/walk: upstream errored, not walking "module.firehose-logging.output.firehose_stream_public_access_logs"
2018/02/01 16:55:55 [TRACE] dag/walk: upstream errored, not walking "root"
2018/02/01 16:55:55 [DEBUG] plugin: waiting for all plugin processes to complete...
2018-02-01T16:55:55.241+0100 [WARN ] plugin: error closing client during Kill: err="connection is shut down"
2018-02-01T16:55:55.241+0100 [DEBUG] plugin: plugin process exited: path=/Users/vlazarenko/work/TNT/terraform/terraform_plans/platform/tools-data/.terraform/plugins/darwin_amd64/terraform-provider-aws_v1.8.0_x4



!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

References

#3071 (comment)

@favoretti Do you mind providing the relevant part of config? Feel free to use our GPG key if for you're worried about exposing any sensitive data.

@radeksimko radeksimko added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Feb 1, 2018
@favoretti
Copy link

@radeksimko Certainly, sorry that I didn't open a new issue in the first place.

resource "aws_kinesis_firehose_delivery_stream" "firehose-stream-public-access-logs" {
  name        = "${var.stage}-${var.service_name}-public-access"
  destination = "elasticsearch"

  elasticsearch_configuration {
    domain_arn = "${aws_elasticsearch_domain.es.arn}"
    role_arn   = "${aws_iam_role.firehose-role.arn}"
    index_name = "public-access-logs"
    type_name  = "log-entry"

    index_rotation_period = "OneDay"
    s3_backup_mode        = "AllDocuments"
  }

  s3_configuration {
    role_arn           = "${aws_iam_role.firehose-role.arn}"
    bucket_arn         = "${aws_s3_bucket.logbucket.arn}"
    prefix             = "public-access-logs/"
    buffer_size        = 5
    buffer_interval    = 400
    compression_format = "GZIP"
  }
}

@bflad
Copy link
Contributor

bflad commented Feb 8, 2018

I have submitted a bug fix PR (#3301) that I'll try to get into the v1.9.0 release tomorrow.

@bflad bflad added this to the v1.9.0 milestone Feb 8, 2018
@favoretti
Copy link

favoretti commented Feb 9, 2018

Awesome! Thanks a lot.
@alex-goncharov

@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

The fix for this has been merged into master and will release with v1.9.0 of the AWS provider, hopefully later today.

@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

This has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@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
3 participants