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 Report aws_kinesis_firehose_delivery_stream #1657

Closed
endzyme opened this issue Sep 13, 2017 · 4 comments · Fixed by #1738
Closed

Crash Report aws_kinesis_firehose_delivery_stream #1657

endzyme opened this issue Sep 13, 2017 · 4 comments · Fixed by #1738
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic.

Comments

@endzyme
Copy link

endzyme commented Sep 13, 2017

Hi there,

Terraform Version

Terraform Version: v0.10.4
Provider Version: v0.1.4

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_kinesis_firehose_delivery_stream

(Happens on one and also many of these definitions)

Terraform Configuration Files

resource "aws_kinesis_firehose_delivery_stream" "broken_tracking_autocomplete_stream" {
  name        = "tracking_autocomplete_stream"
  destination = "extended_s3"

  extended_s3_configuration {
    role_arn           = "${aws_iam_role.firehose_delivery_role.arn}"
    prefix             = "tracking/autocomplete_stream/"
    buffer_interval    = 300
    buffer_size        = 5
    compression_format = "GZIP"
    bucket_arn         = "arn:aws:s3:::non-existant-bucket-broken"
  }
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

NOTE: Crash log is 6MB so I am not including it. I can add later if it's needed.

Panic Output

https://gist.github.com/endzyme/0e3474827f40ce15dd9b83c6886b4c21

Expected Behavior

Should have provisioned a new firehose that doesn't exist.

Actual Behavior

Sometimes get a: unexpected EOF error (see below) and sometimes get a terraform crash.

Error applying plan:

1 error(s) occurred:

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

* aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: unexpected EOF

Steps to Reproduce

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

  1. terraform plan && terraform apply

Important Factoids

This worked once but I had to update all the streams, after updating the streams it gave me the "unexpected EOF" error. I removed all the assets and applied then recreated the items again but got the EOF issue, tried a few more times then got the crash report. Crash report is not 100% reproducible.

References

N/A

@Ninir Ninir added the crash Results from or addresses a Terraform crash or kernel panic. label Sep 18, 2017
@cgarvis
Copy link
Contributor

cgarvis commented Sep 20, 2017

I was able to fix this by adding processing_configuration to my resource

resource "aws_kinesis_firehose_delivery_stream" "firehose" {
        name = "firehose"
        destination = "extended_s3"

        extended_s3_configuration {
                role_arn = "${aws_iam_role.firehose.arn}"
                bucket_arn = "${aws_s3_bucket.bucket.arn}"

                processing_configuration  = [
                    {
                        enabled = "false"
                    }
                ]
        }
}

@endzyme
Copy link
Author

endzyme commented Sep 21, 2017

Was able to reproduce with this "workaround" -- Docs say optional on that param but apparently it is not optional. Thanks @cgarvis!

stack72 added a commit to stack72/terraform-provider-aws that referenced this issue Sep 23, 2017
…g_configuration

Fixes: hashicorp#1657

Before this patch:

```
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: panic: runtime error: index out of range
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4:
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: goroutine 2687 [running]:
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/aws.extractProcessingConfiguration(0xc420c8f650, 0xc42080b710)
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:541 +0x2ad
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/aws.createExtendedS3Config(0xc4203ecc40, 0xb)
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:483 +0x479
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStreamCreate(0xc4203ecc40, 0x29c5ec0, 0xc421689a00, 0x24, 0x40555c0)
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4:   /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:808 +0xbc5
2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc421937ec0, 0xc420c4a820, 0xc420816140, 0x29c5ec0, 0xc421689a00, 0x1
, 0x28, 0xc420c8edb0)
```

After this patch:

```
terraform-testing % terraform apply
aws_s3_bucket.bucket: Refreshing state... (ID: tf-test-bucket-72)
aws_iam_role.firehose: Refreshing state... (ID: tf_acctest_firehose_delivery_role_72)
aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Creating...
  arn:                                                      "" => "<computed>"
  destination:                                              "" => "extended_s3"
  destination_id:                                           "" => "<computed>"
  extended_s3_configuration.#:                              "" => "1"
  extended_s3_configuration.0.bucket_arn:                   "" => "arn:aws:s3:::tf-test-bucket-72"
  extended_s3_configuration.0.buffer_interval:              "" => "300"
  extended_s3_configuration.0.buffer_size:                  "" => "5"
  extended_s3_configuration.0.cloudwatch_logging_options.#: "" => "<computed>"
  extended_s3_configuration.0.compression_format:           "" => "GZIP"
  extended_s3_configuration.0.prefix:                       "" => "tracking/autocomplete_stream/"
  extended_s3_configuration.0.role_arn:                     "" => "arn:aws:iam::187416307283:role/tf_acctest_firehose_delivery_role_72"
  name:                                                     "" => "tracking_autocomplete_stream"
  version_id:                                               "" => "<computed>"
aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Still creating... (10s elapsed)
aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Still creating... (2m0s elapsed)
aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Still creating... (3m30s elapsed)
aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Creation complete after 3m38s (ID: arn:aws:firehose:us-west-2:187416307283...erystream/tracking_autocomplete_stream)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
```

Test Output:

```
terraform-provider-aws [b-aws-kfhd-crash-1657●] % acctests aws TestAccAWSKinesisFirehoseDeliveryStream_
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_s3basic
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (142.95s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (153.92s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (266.77s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (282.11s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidProcessorType
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidProcessorType (2.86s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidParameterName
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidParameterName (2.49s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (182.25s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (902.22s)
=== RUN   TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (1236.74s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	3172.372s
```
@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Sep 26, 2017
@ghost
Copy link

ghost commented Apr 11, 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 11, 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.
Projects
None yet
5 participants
@cgarvis @radeksimko @Ninir @endzyme and others