nat-henderson / terraform-provider-dominos

The Terraform plugin for the Dominos Pizza provider.
MIT License
1.12k stars 86 forks source link

Crash after creating order #12

Open patoarvizu opened 5 years ago

patoarvizu commented 5 years ago

After running terraform apply, I got one of those TERRAFORM CRASH errors (copied below). It seems like something is getting an EOF and it's not handled gracefully.

One thing to note is that I noticed that as I was running terraform plan a couple of times in a row to build my order and make sure it was correct, the HTTP requests made by the provider would sometimes time out, but they would work again after some time. So it's possible that there is some throttling happening on their end. I don't know if this is the same thing, but it sounds to me like it could be related.

I've only seen this once because I've only ordered once and it's obviously not easy to reproduce 🙂

2019-09-29T15:52:59.640-0400 [DEBUG] plugin.terraform-provider-dominos: 2019/09/29 15:52:59 [DEBUG] checking tracker...
2019-09-29T15:52:59.752-0400 [DEBUG] plugin.terraform-provider-dominos: 2019/09/29 15:52:59 [DEBUG] order: (*main.OrderStatus)(nil)
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: panic: runtime error: invalid memory address or nil pointer dereference
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1986c84]
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos:
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: goroutine 104 [running]:
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: main.getOrderStatus(0xc0002752f0, 0xc000802270, 0xa, 0xc000475380, 0x12, 0x1a83b20, 0xc0002752c0, 0x1be0b18, 0x2)
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos:     /Users/parvizu/go/src/github.com/ndmckinley/terraform-provider-dominos/resource_order.go:188 +0xd4
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: main.resourceOrderRead(0xc00014aee0, 0x1a049c0, 0xc00080a800, 0xc, 0xc00050fa38)
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos:     /Users/parvizu/go/src/github.com/ndmckinley/terraform-provider-dominos/resource_order.go:255 +0x9a
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: main.resourceOrderCreate(0xc00014aee0, 0x1a049c0, 0xc00080a800, 0xc00014aee0, 0x0)
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos:     /Users/parvizu/go/src/github.com/ndmckinley/terraform-provider-dominos/resource_order.go:182 +0x230a
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc000112180, 0xc000664640, 0xc0005b43c0, 0x1a049c0, 0xc00080a800, 0x100d701, 0xc0007cbb80, 0x10bb92c)
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos:     /Users/parvizu/go/src/github.com/hashicorp/terraform/helper/schema/resource.go:305 +0x363
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc000112700, 0xc0006645f0, 0xc000664640, 0xc0005b43c0, 0xc000588000, 0x18, 0x285d440)
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos:     /Users/parvizu/go/src/github.com/hashicorp/terraform/helper/schema/provider.go:289 +0x9c
2019-09-29T15:52:59.755-0400 [DEBUG] plugin.terraform-provider-dominos: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc0002ba120, 0xc0005a9e80, 0xc0007cfc20, 0x0, 0x0)
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos:     /Users/parvizu/go/src/github.com/hashicorp/terraform/plugin/resource_provider.go:530 +0x57
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos: reflect.Value.call(0xc00031ac00, 0xc0000d00a8, 0x13, 0x1be1359, 0x4, 0xc0007cbf18, 0x3, 0x3, 0xc000042100, 0x0, ...)
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/reflect/value.go:447 +0x454
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos: reflect.Value.Call(0xc00031ac00, 0xc0000d00a8, 0x13, 0xc0004bc718, 0x3, 0x3, 0x15, 0xc0004bc728, 0x141f6c5)
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/reflect/value.go:308 +0xa4
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos: net/rpc.(*service).call(0xc0000c9b80, 0xc0005980a0, 0xc000802050, 0xc000802060, 0xc00080a000, 0xc0005ce700, 0x19f8a00, 0xc0005a9e80, 0x16, 0x19f8a40, ...)
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/net/rpc/server.go:384 +0x14e
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos: created by net/rpc.(*Server).ServeCodec
2019-09-29T15:52:59.756-0400 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/net/rpc/server.go:481 +0x47e
2019/09/29 15:52:59 [TRACE] root: eval: *terraform.EvalWriteState
2019/09/29 15:52:59 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2019-09-29T15:52:59.760-0400 [DEBUG] plugin: plugin process exited: path=/Users/parvizu/.terraform.d/plugins/terraform-provider-dominos
2019/09/29 15:52:59 [TRACE] root: eval: *terraform.EvalIf
2019/09/29 15:52:59 [TRACE] root: eval: *terraform.EvalWriteState
2019/09/29 15:52:59 [TRACE] root: eval: *terraform.EvalWriteDiff
2019/09/29 15:52:59 [TRACE] root: eval: *terraform.EvalApplyPost
2019/09/29 15:52:59 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error occurred:
    * dominos_order.order: unexpected EOF

2019/09/29 15:52:59 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error occurred:
    * dominos_order.order: unexpected EOF

2019/09/29 15:52:59 [TRACE] [walkApply] Exiting eval tree: dominos_order.order
2019/09/29 15:52:59 [TRACE] dag/walk: upstream errored, not walking "provider.dominos (close)"
2019/09/29 15:52:59 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2019/09/29 15:52:59 [TRACE] dag/walk: upstream errored, not walking "root"
2019/09/29 15:52:59 [TRACE] Preserving existing state lineage "fc1e89b2-07fc-4905-aa6b-d16236abf021"
2019/09/29 15:52:59 [TRACE] Preserving existing state lineage "fc1e89b2-07fc-4905-aa6b-d16236abf021"
2019/09/29 15:52:59 [TRACE] Preserving existing state lineage "fc1e89b2-07fc-4905-aa6b-d16236abf021"
2019/09/29 15:52:59 [TRACE] Preserving existing state lineage "fc1e89b2-07fc-4905-aa6b-d16236abf021"
2019/09/29 15:52:59 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-09-29T15:52:59.792-0400 [WARN ] plugin: error closing client during Kill: err="connection is shut down"
rowanjacobs commented 4 years ago

I got what I think is the same error.

panic: runtime error: invalid memory address or nil pointer dereference
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xc6a3b4]
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: 
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: goroutine 75 [running]:
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: main.getOrderStatus(0xc000629020, 0xc000246260, 0xb, 0xc00003a7e0, 0xe, 0xc00017f3e0, 0xe7050b, 0x2, 0xc00003a7e0)
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos:     /home/nmckinley/go/src/github.com/ndmckinley/terraform-provider-dominos/resource_order.go:188 +0xd4
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: main.resourceOrderRead(0xc000204930, 0xcd8ba0, 0xc000416c80, 0xc, 0xc000143558)
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos:     /home/nmckinley/go/src/github.com/ndmckinley/terraform-provider-dominos/resource_order.go:255 +0x9a
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: main.resourceOrderCreate(0xc000204930, 0xcd8ba0, 0xc000416c80, 0xc000204930, 0x0)
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos:     /home/nmckinley/go/src/github.com/ndmckinley/terraform-provider-dominos/resource_order.go:182 +0x230a
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc000416080, 0xc0002ee6e0, 0xc00017f380, 0xcd8ba0, 0xc000416c80, 0x40d501, 0xc000426b80, 0x4bd85c)
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos:     /home/nmckinley/go/src/github.com/hashicorp/terraform/helper/schema/resource.go:286 +0x363
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc000380150, 0xc0002ee640, 0xc0002ee6e0, 0xc00017f380, 0xc00006a700, 0x18, 0x7f1aba9306c0)
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos:     /home/nmckinley/go/src/github.com/hashicorp/terraform/helper/schema/provider.go:283 +0x9c
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc000256020, 0xc00017eee0, 0xc0002839c0, 0x0, 0x0)
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos:     /home/nmckinley/go/src/github.com/hashicorp/terraform/plugin/resource_provider.go:530 +0x57
2020-04-25T15:53:55.677-0700 [DEBUG] plugin.terraform-provider-dominos: reflect.Value.call(0xc0000c3440, 0xc0000c0008, 0x13, 0xe70ce0, 0x4, 0xc000426f18, 0x3, 0x3, 0xc000364140, 0x2000100000000, ...)
2020-04-25T15:53:55.678-0700 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/reflect/value.go:447 +0x454
2020-04-25T15:53:55.678-0700 [DEBUG] plugin.terraform-provider-dominos: reflect.Value.Call(0xc0000c3440, 0xc0000c0008, 0x13, 0xc0003d0718, 0x3, 0x3, 0x2, 0x0, 0x0)
2020-04-25T15:53:55.678-0700 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/reflect/value.go:308 +0xa4
2020-04-25T15:53:55.678-0700 [DEBUG] plugin.terraform-provider-dominos: net/rpc.(*service).call(0xc0000c4000, 0xc0000d07d0, 0xc000246028, 0xc000246050, 0xc000416400, 0xc000256740, 0xccfd20, 0xc00017eee0, 0x16, 0xccfd60, ...)
2020-04-25T15:53:55.678-0700 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/net/rpc/server.go:384 +0x14e
2020-04-25T15:53:55.678-0700 [DEBUG] plugin.terraform-provider-dominos: created by net/rpc.(*Server).ServeCodec
2020-04-25T15:53:55.678-0700 [DEBUG] plugin.terraform-provider-dominos:     /usr/local/go/src/net/rpc/server.go:481 +0x47e
2020/04/25 15:53:55 [TRACE] root: eval: *terraform.EvalWriteState
2020/04/25 15:53:55 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2020/04/25 15:53:55 [TRACE] root: eval: *terraform.EvalIf
2020/04/25 15:53:55 [TRACE] root: eval: *terraform.EvalWriteState
2020/04/25 15:53:55 [TRACE] root: eval: *terraform.EvalWriteDiff
2020/04/25 15:53:55 [TRACE] root: eval: *terraform.EvalApplyPost
2020/04/25 15:53:55 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* dominos_order.order: unexpected EOF
2020/04/25 15:53:55 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* dominos_order.order: unexpected EOF
2020/04/25 15:53:55 [TRACE] [walkApply] Exiting eval tree: dominos_order.order
2020/04/25 15:53:55 [TRACE] dag/walk: upstream errored, not walking "provider.dominos (close)"
2020/04/25 15:53:55 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2020/04/25 15:53:55 [TRACE] dag/walk: upstream errored, not walking "root"
2020-04-25T15:53:55.682-0700 [DEBUG] plugin: plugin process exited: path=/home/rowan/.terraform.d/plugins/terraform-provider-dominos
2020/04/25 15:53:55 [TRACE] Preserving existing state lineage "727443c1-8b2b-464d-a70c-d7ef263278da"
2020/04/25 15:53:55 [DEBUG] plugin: waiting for all plugin processes to complete...
2020-04-25T15:53:55.745-0700 [WARN ] plugin: error closing client during Kill: err="connection is shut down"

!!!!!!!!!!!!!!!!!!!!!!!!!!! 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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!

However, judging by my credit card transactions, the API request went through successfully.

mengesb commented 4 years ago

That looks like an unhandled response; unfortunately you'd need to log the response content as a full object before knowing what it exploded on