Crash on tofu providers schema -json
Closed this issue · 1 comments
chenzejun commented
OpenTofu Version
-> % tofu -v
OpenTofu v1.7.0
on windows_amd64
+ provider registry.opentofu.org/hashicorp/random v3.6.1
OpenTofu Configuration Files
resource "random_pet" "dog" {
length = 12
}
Debug Output
May not helpful
Expected Behavior
Get provider schema
Actual Behavior
!!!!!!!!!!!!!!!!!!!!!!!!!!! OPENTOFU CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
OpenTofu crashed! This is always indicative of a bug within OpenTofu.
Please report the crash with OpenTofu[1] so that we can fix this.
When reporting bugs, please include your OpenTofu version, the stack trace
shown below, and any additional information which may help replicate the issue.
[1]: https://github.com/opentofu/opentofu/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! OPENTOFU CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
runtime/debug/stack.go:16 +0x13
github.com/opentofu/opentofu/internal/logging.panicHandler({0x2e91c00, 0x5365340}, {0x0, 0x0, 0x0})
github.com/opentofu/opentofu/internal/logging/panic.go:96 +0xe5
github.com/opentofu/opentofu/internal/logging.PanicHandler()
github.com/opentofu/opentofu/internal/logging/panic.go:51 +0x88
panic({0x2e91c00?, 0x5365340?})
runtime/panic.go:920 +0x270
github.com/opentofu/opentofu/internal/states/statefile.Read({0x3ad3880?, 0xc0004d03e0?}, {0x0, 0x0})
github.com/opentofu/opentofu/internal/states/statefile/read.go:79 +0x165
github.com/opentofu/opentofu/internal/states/statemgr.(*Filesystem).refreshState(0xc000608990)
github.com/opentofu/opentofu/internal/states/statemgr/filesystem.go:311 +0x32d
github.com/opentofu/opentofu/internal/states/statemgr.(*Filesystem).RefreshState(0xc000086810?)
github.com/opentofu/opentofu/internal/states/statemgr/filesystem.go:251 +0x79
github.com/opentofu/opentofu/internal/backend/local.(*Local).localRun(0xc0006ffce0, 0xc000563180)
github.com/opentofu/opentofu/internal/backend/local/backend_local.go:67 +0x5d3
github.com/opentofu/opentofu/internal/backend/local.(*Local).LocalRun(0xc0002e1340?, 0xc000563180)
github.com/opentofu/opentofu/internal/backend/local/backend_local.go:39 +0x87
github.com/opentofu/opentofu/internal/command.(*ProvidersSchemaCommand).Run(0xc0002e1340, {0xc0000d20b0?, 0xffffffffffffffff?, 0x0?})
github.com/opentofu/opentofu/internal/command/providers_schema.go:98 +0x6d5
github.com/mitchellh/cli.(*CLI).Run(0xc000562640)
github.com/mitchellh/cli@v1.1.5/cli.go:262 +0x5b8
main.realMain()
github.com/opentofu/opentofu/cmd/tofu/main.go:347 +0x206b
main.main()
github.com/opentofu/opentofu/cmd/tofu/main.go:66 +0x13
Steps to Reproduce
- tofu init
- tofu apply
- tofu providers schema -json
Additional Context
No response
References
No response
cam72cam commented
Should be fixed by https://github.com/opentofu/opentofu/pull/1618/files#diff-33324be3e6b15f83d454ceae1121f2f5e2e3c538269987de9b0cae986e63e24fR60-R94 which I'm hoping to have out in 1.7.1 tomorrow.