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 #32186
Comments
I have also seen this behaviour with terraform v1.3.4 using the Linux binary download https://releases.hashicorp.com/terraform/1.3.4/terraform_1.3.4_linux_amd64.zip This was after doing a change of version for the azurerm provider and was run in a docker image in a jenkins pipeline
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! Terraform crashed! This is always indicative of a bug within Terraform. When reporting bugs, please include your terraform version, the stack trace |
I too have this issue. Ouptut |
Hit this one as well with 1.3.4 on linux...
|
This just started for us today using Gitlab with gitlab-runner 15.5.0 (0d4137b8). We are dead in the water. |
I just ran into it, now. I was able to destroy one of my environments and when I try to destroy another one these error pop. Terraform v1.3.4 Using the mac version. Also I notice that if I destroy some of my objects manually and then run a plan, terraform won't notice any changes in the state. |
Ok, in my case. I was pointing my backend to the wrong state file, once I make the changed it worked fine |
I have confirmed that the state file being used, Gitlab Managed, is not the cause. I removed the existing state file and it was recreated but still caused the original crash. |
For us this appeared when trying to store the output plan of "terraform plan -destroy" on a module with empty state file
whereas it was expected to export an empty plan in the relevant file. |
@jbardin Sorry to be a stickler... but shouldn't we confirm that this resolves the reported issue for the users? |
@RustedBl4de, issues are closed by GitHub automatically upon merging the associated PR into the development branch. The issue can be re-opened or new issues filed if the next release does not address the problem. |
Thanks for the response and all the work!! |
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. |
Terraform Version
Terraform Configuration Files
was trying to run terraform destroy
Debug Output
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
attempt to write nil state to file
goroutine 71 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x19
github.com/hashicorp/terraform/internal/logging.PanicHandler()
/home/circleci/project/project/internal/logging/panic.go:55 +0x153
panic({0x2143f40, 0x2b43210})
/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/hashicorp/terraform/internal/states/statefile.writeStateV4(0xc00310ba8c?, {0x2b46420?, 0xc003fdf360?})
/home/circleci/project/project/internal/states/statefile/version4.go:322 +0x15f8
github.com/hashicorp/terraform/internal/states/statefile.Write(0xc00310bc50?, {0x2b46420?, 0xc003fdf360?})
/home/circleci/project/project/internal/states/statefile/write.go:15 +0x45
github.com/hashicorp/terraform/internal/plans/planfile.Create({0x7f14d63db020?, 0x60?}, {0xc000128330, 0xc00310be30, 0xc0031d5950, 0xc004f6d1e0, 0xc0007508b8})
/home/circleci/project/project/internal/plans/planfile/writer.go:103 +0x670
github.com/hashicorp/terraform/internal/backend/local.(*Local).opPlan(0xc00030be00, {0x2b6adb8, 0xc0008c5d80}, {0x2b6adb8, 0xc0008c5dc0}, 0xc0004fb440, 0xc0008c5d40)
/home/circleci/project/project/internal/backend/local/backend_plan.go:138 +0x905
github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1()
/home/circleci/project/project/internal/backend/local/backend.go:323 +0xc3
created by github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation
/home/circleci/project/project/internal/backend/local/backend.go:316 +0x44a
Operation failed: failed running terraform plan (exit 11)
Expected Behavior
should run command successfully and destroy resources
Actual Behavior
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
attempt to write nil state to file
goroutine 71 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x19
github.com/hashicorp/terraform/internal/logging.PanicHandler()
/home/circleci/project/project/internal/logging/panic.go:55 +0x153
panic({0x2143f40, 0x2b43210})
/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/hashicorp/terraform/internal/states/statefile.writeStateV4(0xc00310ba8c?, {0x2b46420?, 0xc003fdf360?})
/home/circleci/project/project/internal/states/statefile/version4.go:322 +0x15f8
github.com/hashicorp/terraform/internal/states/statefile.Write(0xc00310bc50?, {0x2b46420?, 0xc003fdf360?})
/home/circleci/project/project/internal/states/statefile/write.go:15 +0x45
github.com/hashicorp/terraform/internal/plans/planfile.Create({0x7f14d63db020?, 0x60?}, {0xc000128330, 0xc00310be30, 0xc0031d5950, 0xc004f6d1e0, 0xc0007508b8})
/home/circleci/project/project/internal/plans/planfile/writer.go:103 +0x670
github.com/hashicorp/terraform/internal/backend/local.(*Local).opPlan(0xc00030be00, {0x2b6adb8, 0xc0008c5d80}, {0x2b6adb8, 0xc0008c5dc0}, 0xc0004fb440, 0xc0008c5d40)
/home/circleci/project/project/internal/backend/local/backend_plan.go:138 +0x905
github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1()
/home/circleci/project/project/internal/backend/local/backend.go:323 +0xc3
created by github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation
/home/circleci/project/project/internal/backend/local/backend.go:316 +0x44a
Operation failed: failed running terraform plan (exit 11)
Steps to Reproduce
terraform destroy
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: