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 on init #28351

Open
Jyoti492 opened this issue Apr 13, 2021 · 0 comments
Open

Terraform crash on init #28351

Jyoti492 opened this issue Apr 13, 2021 · 0 comments
Labels
backend/azure bug new new issue not yet triaged

Comments

@Jyoti492
Copy link

Jyoti492 commented Apr 13, 2021

Hi Team,

I am facing Terraform crash issue suddenly on my terraform module:

goroutine 1 [running]:
github.com/hashicorp/terraform/backend/remote-state/azure.(*RemoteClient).Get(0xc0001f23c0, 0xc00004d0e0, 0x26d47b3, 0xc000225680)
/home/circleci/project/project/backend/remote-state/azure/client.go:42 +0x15f
github.com/hashicorp/terraform/states/remote.(*State).refreshState(0xc0007352c0, 0x26d4701, 0x7, 0x0)
/home/circleci/project/project/states/remote/state.go:117 +0x38
github.com/hashicorp/terraform/states/remote.(*State).RefreshState(0xc0007352c0, 0x0, 0x0)
/home/circleci/project/project/states/remote/state.go:104 +0x71
github.com/hashicorp/terraform/command.(*InitCommand).Run(0xc0001ec8c0, 0xc0000902b0, 0x5, 0x5, 0xc0001177f0)
/home/circleci/project/project/command/init.go:284 +0x1700
github.com/mitchellh/cli.(*CLI).Run(0xc0005ac280, 0xc0005ac280, 0xc00052bd48, 0x1)
/home/circleci/project/project/vendor/github.com/mitchellh/cli/cli.go:255 +0x1da
main.wrappedMain(0x0)
/home/circleci/project/project/main.go:275 +0xc90
main.realMain(0x0)
/home/circleci/project/project/main.go:106 +0xde
main.main()
/home/circleci/project/project/main.go:42 +0x3a

Crash Output

2021/04/13 16:49:35 [TRACE] Meta.Backend: built configuration for "azurerm" backend with hash value 1579948698
2021/04/13 16:49:35 [TRACE] Preserving existing state lineage "bcb01c96-3250-87cf-e377-bcba9c4eea60"
2021/04/13 16:49:35 [TRACE] Preserving existing state lineage "bcb01c96-3250-87cf-e377-bcba9c4eea60"
2021/04/13 16:49:35 [TRACE] Meta.Backend: working directory was previously initialized for "azurerm" backend
2021/04/13 16:49:35 [TRACE] backendConfigNeedsMigration: given configuration matches cached configuration, so no migration is required
2021/04/13 16:49:35 [TRACE] Meta.Backend: using already-initialized "azurerm" backend configuration
2021/04/13 16:49:35 [TRACE] Meta.Backend: instantiated backend of type *azure.Backend
2021/04/13 16:49:35 [DEBUG] checking for provisioner in "."
2021/04/13 16:49:35 [DEBUG] checking for provisioner in "/usr/local/bin"
2021/04/13 16:49:35 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
2021/04/13 16:49:35 [TRACE] Meta.Backend: backend *azure.Backend does not support operations, so wrapping it in a local backend
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x12591df]

goroutine 1 [running]:
github.com/hashicorp/terraform/backend/remote-state/azure.(*RemoteClient).Get(0xc0004a63c0, 0xc0006580f0, 0x26d47b3, 0xc0002116b0)
	/home/circleci/project/project/backend/remote-state/azure/client.go:42 +0x15f
github.com/hashicorp/terraform/states/remote.(*State).refreshState(0xc0007aaea0, 0x26d4701, 0x7, 0x0)
	/home/circleci/project/project/states/remote/state.go:117 +0x38
github.com/hashicorp/terraform/states/remote.(*State).RefreshState(0xc0007aaea0, 0x0, 0x0)
	/home/circleci/project/project/states/remote/state.go:104 +0x71
github.com/hashicorp/terraform/command.(*InitCommand).Run(0xc00055b500, 0xc000516310, 0x5, 0x5, 0xc0005360c0)
	/home/circleci/project/project/command/init.go:284 +0x1700
github.com/mitchellh/cli.(*CLI).Run(0xc0005283c0, 0xc0005283c0, 0xc0005bfd48, 0x1)
	/home/circleci/project/project/vendor/github.com/mitchellh/cli/cli.go:255 +0x1da
main.wrappedMain(0x0)
	/home/circleci/project/project/main.go:275 +0xc90
main.realMain(0x0)
	/home/circleci/project/project/main.go:106 +0xde
main.main()
	/home/circleci/project/project/main.go:42 +0x3a

Expected Behavior

init should work with backend initialization

Actual Behavior

init crash

@Jyoti492 Jyoti492 added bug new new issue not yet triaged labels Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/azure bug new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants