-
Notifications
You must be signed in to change notification settings - Fork 230
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
[CRITICAL][v2.8.0] Data resources cause provider segmentation fault on new state #813
Comments
Hi @nfx 👋 Thank you for raising this and sorry you ran into trouble. I was able to create covering testing for this situation and will submit the fix shortly. |
Reference: #813 Previously: ``` --- FAIL: TestReadDataSource/optional-no-id (0.00s) panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x12f3f64] goroutine 20 [running]: testing.tRunner.func1.2({0x1418300, 0x17d34d0}) /usr/local/Cellar/go/1.17.1/libexec/src/testing/testing.go:1209 +0x24e testing.tRunner.func1() /usr/local/Cellar/go/1.17.1/libexec/src/testing/testing.go:1212 +0x218 panic({0x1418300, 0x17d34d0}) /usr/local/Cellar/go/1.17.1/libexec/src/runtime/panic.go:1038 +0x215 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc00013ce58, {0x1583cb0, 0xc000128008}, 0xc0001626a0) /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider.go:1126 +0x304 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.TestReadDataSource.func9(0xc0002124e0) /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider_test.go:1381 +0x6b ```
Reference: #813 Previously: ``` --- FAIL: TestReadDataSource/optional-no-id (0.00s) panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x12f3f64] goroutine 20 [running]: testing.tRunner.func1.2({0x1418300, 0x17d34d0}) /usr/local/Cellar/go/1.17.1/libexec/src/testing/testing.go:1209 +0x24e testing.tRunner.func1() /usr/local/Cellar/go/1.17.1/libexec/src/testing/testing.go:1212 +0x218 panic({0x1418300, 0x17d34d0}) /usr/local/Cellar/go/1.17.1/libexec/src/runtime/panic.go:1038 +0x215 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc00013ce58, {0x1583cb0, 0xc000128008}, 0xc0001626a0) /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider.go:1126 +0x304 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.TestReadDataSource.func9(0xc0002124e0) /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/grpc_provider_test.go:1381 +0x6b ```
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. |
SDK version
SDK v2.8.0 crashes provider data resources: databricks/terraform-provider-databricks#854
Logs say:
Instance Diff is nil in Diff()
, which is a valid case for starting new terraform state:Closer inspection of SDK updates - v2.7.0...v2.8.0 - show, that
diff.RawConfig = configVal
was added without a wrapping nil check.Terraform Configuration Files
Debug Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform init && terraform plan
References
The text was updated successfully, but these errors were encountered: