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

Terraform crash during Azure destroy #30901

Closed
devsecfranklin opened this issue Apr 20, 2022 · 3 comments
Closed

Terraform crash during Azure destroy #30901

devsecfranklin opened this issue Apr 20, 2022 · 3 comments
Labels

Comments

@devsecfranklin
Copy link

Terraform Version

╰─λ terraform --version
Terraform v1.0.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0

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

Terraform Configuration Files

...

Debug Output

azurerm_resource_group.this: Destruction complete after 18s
Releasing state lock. This may take a few moments...
╷
│ Error: Error releasing the state lock
│ 
│ Error message: failed to retrieve lock info: blobs.Client#GetProperties: Failure sending request: StatusCode=0 -- Original Error: Head
│ "https://custxabc.blob.core.windows.net/tfstatemarvell/terraform-vm.tfstate": dial tcp: lookup custxabc.blob.core.windows.net on
│ 127.0.0.53:53: no such host
│ 
│ Terraform acquires a lock when accessing your state to prevent others
│ running Terraform to potentially modify the state at the same time. An
│ error occurred while releasing this lock. This could mean that the lock
│ did or did not release properly. If the lock didn't release properly,
│ Terraform may not be able to run future commands since it'll appear as if
│ the lock is held.
│ 
│ In this scenario, please call the "force-unlock" command to unlock the
│ state manually. This is a very dangerous operation since if it is done
│ erroneously it could result in two people modifying state at the same time.
│ Only call this command if you're certain that the unlock above failed and
│ that no one else is holding a lock.
╵
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1428423]

goroutine 39 [running]:
github.com/hashicorp/terraform/internal/backend/remote-state/azure.(*RemoteClient).Put(0xc0001a6960, 0xc0016ce000, 0x9c, 0x9c, 0x0, 0xc001c844e0)
        /home/circleci/project/project/internal/backend/remote-state/azure/client.go:89 +0x263
github.com/hashicorp/terraform/internal/states/remote.(*State).PersistState(0xc0000b0060, 0x0, 0x0)
        /home/circleci/project/project/internal/states/remote/state.go:181 +0x228
github.com/hashicorp/terraform/internal/states/statemgr.WriteAndPersist(0x7fc797a59578, 0xc0000b0060, 0xc0001821a0, 0x7fc797a59578, 0xc0000b0060)
        /home/circleci/project/project/internal/states/statemgr/helper.go:52 +0x79
github.com/hashicorp/terraform/internal/backend/local.(*Local).opApply(0xc0007c8f00, 0x2bb29d8, 0xc000956bc0, 0x2bb29d8, 0xc000956c00, 0xc0003f19e0, 0xc000956b80)
        /home/circleci/project/project/internal/backend/local/backend_apply.go:172 +0x7ba
github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1(0xc00098f6d0, 0xc00098f6e0, 0xc00098f6f0, 0xc0007c8f00, 0xc00098f6c0, 0x2bb29d8, 0xc000956bc0, 0x2bb29d8, 0xc000956c00, 0xc0003f19e0, ...)
        /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

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.783382340.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.

Expected Behavior

Trying to destroy infra with remote state.

Steps to Reproduce

terraform destroy

crash.783382340.log

@devsecfranklin devsecfranklin added bug new new issue not yet triaged labels Apr 20, 2022
@userbradley
Copy link

I'm by no means an expert, but it looks like DNS?

127.0.0.53:53

Makes me think so.

Can you try and clean DNS cache, or perhaps try an nslookup of custxabc.blob.core.windows.net?

@kmoe
Copy link
Member

kmoe commented Apr 21, 2022

This is a duplicate of #28952.

@kmoe kmoe closed this as completed Apr 21, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants