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

[azurerm] SIGSEGV on vnet import #22235

Closed
kenorb opened this issue Jul 29, 2019 · 2 comments
Closed

[azurerm] SIGSEGV on vnet import #22235

kenorb opened this issue Jul 29, 2019 · 2 comments

Comments

@kenorb
Copy link

kenorb commented Jul 29, 2019

Terraform Version

$  terraform --version
Terraform v0.12.5
+ provider.azurerm v1.32.0

Terraform Configuration Files

resource "azurerm_virtual_network_peering" "foo-bar" {
  name                         = "peerUKSX2UKSouthY"
  resource_group_name          = var.resource_group_name
  virtual_network_name         = "uk_south_netmap"
  remote_virtual_network_id    = "/subscriptions/xxx/resourceGroups/foo-bar/providers/Microsoft.Network/virtualNetworks/uk_south"
  allow_virtual_network_access = true
  allow_forwarded_traffic      = false
  allow_gateway_transit        = false
  depends_on                   = ["module.net-uk_south_foo"]
}

Debug Output

Check the log crash below.

Crash Output

 $  terraform import azurerm_virtual_network_peering.peerUKSnm2UKSouth /subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south
azurerm_virtual_network_peering.peerUKSnm2UKSouth: Importing from ID "/subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south"...
azurerm_virtual_network_peering.peerUKSnm2UKSouth: Import prepared!
  Prepared azurerm_virtual_network_peering for import
azurerm_virtual_network_peering.peerUKSnm2UKSouth: Refreshing state... [id=/subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south]

Error: rpc error: code = Unavailable desc = transport is closing


Releasing state lock. This may take a few moments...

$  terraform import azurerm_virtual_network_peering.peerUKSnm2UKSouth /subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south
azurerm_virtual_network_peering.peerUKSnm2UKSouth: Importing from ID "/subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south"...
azurerm_virtual_network_peering.peerUKSnm2UKSouth: Import prepared!
  Prepared azurerm_virtual_network_peering for import
azurerm_virtual_network_peering.peerUKSnm2UKSouth: Refreshing state... [id=/subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south]

Error: rpc error: code = Unavailable desc = transport is closing


panic: runtime error: invalid memory address or nil pointer dereference
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3856f64]
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: goroutine 90 [running]:
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: github.com/terraform-providers/terraform-provider-azurerm/azurerm.resourceArmVirtualNetworkPeeringRead(0xc0005c0690, 0x3dfdcc0, 0xc0007de000, 0xc0005c0690, 0x0)
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/resource_arm_virtual_network_peering.go:149 +0x464
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc00074cd00, 0xc000514230, 0x3dfdcc0, 0xc0007de000, 0xc000adc6f0, 0xc000514230, 0x0)
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:447 +0x119
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/plugin.(*GRPCProviderServer).ReadResource(0xc0000c24a0, 0x4586d40, 0xc000adc210, 0xc0010c60c0, 0xc0000c24a0, 0xc000adc210, 0xc000823ba8)
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go:496 +0x334
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/internal/tfplugin5._Provider_ReadResource_Handler(0x3dfe740, 0xc0000c24a0, 0x4586d40, 0xc000adc210, 0xc0005140f0, 0x0, 0x4586d40, 0xc000adc210, 0xc0010f4000, 0x179)
2019-07-29T17:13:02.222+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go:2983 +0x23e
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc00054c600, 0x45cdfa0, 0xc00054cd80, 0xc000a0c000, 0xc0007323c0, 0x7409650, 0x0, 0x0, 0x0)
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:972 +0x470
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).handleStream(0xc00054c600, 0x45cdfa0, 0xc00054cd80, 0xc000a0c000, 0x0)
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:1252 +0xda6
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00024e110, 0xc00054c600, 0x45cdfa0, 0xc00054cd80, 0xc000a0c000)
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:691 +0x9f
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: created by github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
2019-07-29T17:13:02.223+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/google.golang.org/grpc/server.go:689 +0xa1
2019/07/29 17:13:02 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2019/07/29 17:13:02 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2019/07/29 17:13:02 [TRACE] [walkImport] Exiting eval tree: import azurerm_virtual_network_peering.peerUKSnm2UKSouth result
2019/07/29 17:13:02 [TRACE] vertex "import azurerm_virtual_network_peering.peerUKSnm2UKSouth result": visit complete
2019/07/29 17:13:02 [TRACE] vertex "azurerm_virtual_network_peering.peerUKSnm2UKSouth (import id \"/subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south\")": dynamic subgraph encountered errors
2019/07/29 17:13:02 [TRACE] vertex "azurerm_virtual_network_peering.peerUKSnm2UKSouth (import id \"/subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south\")": visit complete
2019/07/29 17:13:02 [TRACE] dag/walk: upstream of "provider.azurerm (close)" errored, so skipping
2019/07/29 17:13:02 [TRACE] dag/walk: upstream of "root" errored, so skipping
2019-07-29T17:13:02.227+0100 [DEBUG] plugin: plugin process exited: path=/Users/kenorb/example/.terraform/plugins/darwin_amd64/terraform-provider-azurerm_v1.32.0_x4 pid=27067 error="exit status 2"
2019-07-29T17:13:02.490+0100 [DEBUG] plugin: plugin exited



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

Crash log: crash.log.gz

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. I've created peering manually in Azure.
  2. I've tried to import it via terraform import azurerm_virtual_network_peering.peerUKSnm2UKSouth /subscriptions/6fc88d09-cfee-4f23-yyy-xxx/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/uk_south, but I had the error: Error: rpc error: code = Unavailable desc = transport is closing.
  3. So I've retried again, I had Error: rpc error: code = Unavailable desc = transport is closing error again, but this time Terraform crashed.

Additional Context

References

@ghost
Copy link

ghost commented Aug 28, 2019

This issue has been automatically migrated to hashicorp/terraform-provider-azurerm#4169 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-azurerm#4169.

@ghost
Copy link

ghost commented Sep 28, 2019

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Sep 28, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants