Skip to content

SIGSEGV crash in the Azure backend when writing new state snapshot #29383

Closed
@maintilla

Description

@maintilla

During Terraform apply I got the following error:

Releasing state lock. This may take a few moments...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x14207c3]

goroutine 36 [running]:
github.com/hashicorp/terraform/internal/backend/remote-state/azure.(*RemoteClient).Put(0xc000744690, 0xc000c4c000, 0xd254, 0xd254, 0x0, 0xc00189ac00)
/home/circleci/project/project/internal/backend/remote-state/azure/client.go:89 +0x263
github.com/hashicorp/terraform/internal/states/remote.(*State).PersistState(0xc000712180, 0x0, 0x0)
/home/circleci/project/project/internal/states/remote/state.go:181 +0x228
github.com/hashicorp/terraform/internal/states/statemgr.WriteAndPersist(0x7ff0566b6d48, 0xc000712180, 0xc000422ae0, 0x7ff0566b6d48, 0xc000712180)
/home/circleci/project/project/internal/states/statemgr/helper.go:52 +0x79
github.com/hashicorp/terraform/internal/backend/local.(*Local).opApply(0xc00084e0a0, 0x2cb9e58, 0xc0005d6fc0, 0x2cb9e58, 0xc0005d7000, 0xc0005e3320, 0xc0005d6f80)
/home/circleci/project/project/internal/backend/local/backend_apply.go:172 +0x7ba
github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1(0xc000858e20, 0xc000858e30, 0xc000858e40, 0xc00084e0a0, 0xc000858e10, 0x2cb9e58, 0xc0005d6fc0, 0x2cb9e58, 0xc0005d7000, 0xc0005e3320, ...)
/home/circleci/project/project/internal/backend/local/backend.go:321 +0xe8
created by github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation
/home/circleci/project/project/internal/backend/local/backend.go:315 +0x2f2

crash.878301482.log

$ terraform --version
Terraform v1.0.2
on linux_amd64

  • provider registry.terraform.io/hashicorp/azurerm v2.68.0
  • provider registry.terraform.io/hashicorp/random v3.1.0

Your version of Terraform is out of date! The latest version
is 1.0.4. You can update by downloading from https://www.terraform.io/downloads.html

Terraform tfstate was empty after crash, so I had to proceed manually.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions