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

Upgrading to 4.6: Error: The terraform-provider-azurerm_v4.6.0_x5 plugin crashed! #27751

Open
1 task done
unkinected opened this issue Oct 24, 2024 · 0 comments · May be fixed by #27762
Open
1 task done

Upgrading to 4.6: Error: The terraform-provider-azurerm_v4.6.0_x5 plugin crashed! #27751

unkinected opened this issue Oct 24, 2024 · 0 comments · May be fixed by #27762

Comments

@unkinected
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.8

AzureRM Provider Version

4.6

Affected Resource(s)/Data Source(s)

Terraform Configuration Files

terraform {
  cloud {
    organization = "my org"
    
    workspaces { 
      name = "Azure"
    }
  }

  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=4.6.0"
    }

    required_version = ">= 1.9.2"
}

provider "azurerm" {
  features {}
  resource_provider_registrations = "none"
  subscription_id = "<redacted>"
}

This problem seems to affect every single type of resource I have (see panic output), so I'm not sure what other config to include here. My config works in 4.1 and without any changes, I get the panic when I try to upgrade to 4.2-4.6.

terraform -v:
Terraform v1.9.8
on darwin_arm64

Debug Output/Panic Output

Stack trace from the terraform-provider-azurerm_v4.6.0_x5 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x58b08af]

goroutine 405 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/dataprotection.resourceDataProtectionBackupVaultRead(0xc00325a400, {0x70111e0?, 0xc001609b08?})
github.com/hashicorp/terraform-provider-azurerm/internal/services/dataprotection/data_protection_backup_vault_resource.go:260 +0x6af
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x8858b18?, {0x8858b18?, 0xc0032538f0?}, 0xd?, {0x70111e0?, 0xc001609b08?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:783 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000ba0380, {0x8858b18, 0xc0032538f0}, 0xc00197fad0, {0x70111e0, 0xc001609b08})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/resource.go:1089 +0x529
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000568e58, {0x8858b18?, 0xc003253830?}, 0xc003212fc0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.33.0/helper/schema/grpc_provider.go:667 +0x4aa
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ReadResource(0xc001a727e0, {0x8858b18?, 0xc003253560?}, 0xc003212fc0)
github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_ReadResource.go:35 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc0014a4140, {0x8858b18?, 0xc0035777a0?}, 0xc00028b810)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:783 +0x309
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x7d172e0, 0xc0014a4140}, {0x8858b18, 0xc0035777a0}, 0xc0032c5480, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc001bcc000, {0x8858b18, 0xc003577710}, {0x8885520, 0xc000278600}, 0xc003687320, 0xc00173fda0, 0xdd30388, 0x0)
google.golang.org/grpc@v1.63.2/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc001bcc000, {0x8885520, 0xc000278600}, 0xc003687320)
google.golang.org/grpc@v1.63.2/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 37
google.golang.org/grpc@v1.63.2/server.go:1030 +0x125

Error: The terraform-provider-azurerm_v4.6.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.


Plus I get a billion of these messages, for every type of resource I have in my project:

Error: Request cancelled
with azurerm_resource_group.myrg
on resourcegroups.tf line 150, in resource "azurerm_resource_group" "myrg":
resource "azurerm_resource_group" "myrg" {
The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Expected Behaviour

This was working fine on v4.1.0. I changed version to anything from 4.2 to 4.6 and always get the error. I tried various suggestions found online:

  • deleting .terraform.lock.hcl file and doing a fresh init
  • export GODEBUG=asyncpreemptoff=1
  • terraform plan -refresh=false works, but the subsequent terraform plan fails

I'm using HCP terraform as well, so I don't think this is a local computer issue.

Actual Behaviour

Get a crash no matter what I do.

Steps to Reproduce

terraform plan

Important Factoids

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants