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

panic: runtime error: invalid memory address or nil pointer dereference in v1.5.1 and v1.5.2 #1427

Closed
j4zzcat opened this issue May 8, 2020 · 4 comments

Comments

@j4zzcat
Copy link

j4zzcat commented May 8, 2020

Hello, I have a terraform script that works well with v1.5.0.
However, with version 1.5.1 and 1.5.2 terraform crashes with panic, indicating a 'panic: runtime error: invalid memory address or nil pointer dereference'.

2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: panic: runtime error: invalid memory address or nil pointer dereference
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: [signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x185e4db]
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1:
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: goroutine 56 [running]:
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: github.com/IBM-Cloud/terraform-provider-ibm/ibm.dataSourceIBMISImageRead(0xc0003c5d50, 0x2123b00, 0xc0007ebc00, 0xc0003c5d50, 0x0)
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/src/github.com/IBM-Cloud/terraform-provider-ibm/ibm/data_source_ibm_is_image.go:59 +0x11b
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc000587a00, 0xc000414b00, 0x2123b00, 0xc0007ebc00, 0xc000658978, 0x1, 0x0)
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/helper/schema/resource.go:398 +0x88
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).ReadDataApply(0xc00073be00, 0xc0006239d8, 0xc000414b00, 0xc000414b00, 0x0, 0x0)
2020-05-08T20:10:20.522Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/helper/schema/provider.go:451 +0x8f
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc00000eea0, 0x2608480, 0xc0008bcf60, 0xc000833d40, 0xc00000eea0, 0xc0008bcf60, 0xc00010aa80)
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/internal/helper/plugin/grpc_provider.go:1036 +0x44e
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler(0x20a20c0, 0xc00000eea0, 0x2608480, 0xc0008bcf60, 0xc0008371a0, 0x0, 0x2608480, 0xc0008bcf60, 0xc000047d40, 0x5b)
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/internal/tfplugin5/tfplugin5.pb.go:3225 +0x217
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000138000, 0x261c1e0, 0xc0000fe600, 0xc00081e500, 0xc0001829c0, 0x3526730, 0x0, 0x0, 0x0)
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:995 +0x460
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: google.golang.org/grpc.(*Server).handleStream(0xc000138000, 0x261c1e0, 0xc0000fe600, 0xc00081e500, 0x0)
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:1275 +0xd97
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00036e1c0, 0xc000138000, 0x261c1e0, 0xc0000fe600, 0xc00081e500)
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:710 +0xbb
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-05-08T20:10:20.524Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: /Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.23.0/server.go:708 +0xa1
2020-05-08T20:10:20.525Z [DEBUG] plugin: plugin process exited: path=/root/.terraform.d/plugins/terraform-provider-ibm_v1.5.1 pid=148 error="exit status 2"
2020/05/08 20:10:20 [ERROR] module.vpc: eval: *terraform.EvalReadData, err: rpc error: code = Unavailable desc = transport is closing
2020/05/08 20:10:20 [ERROR] module.vpc: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/05/08 20:10:20 [TRACE] [walkRefresh] Exiting eval tree: module.vpc.data.ibm_is_image.ubuntu_1804

@hkantare
Copy link
Collaborator

Can you let us know did you set the ibmcloud api key either in provider block or via environmental variable(IC_API_KEY)

@j4zzcat
Copy link
Author

j4zzcat commented May 11, 2020

Env variable 'IBMCLOUD_API_KEY'.

@hkantare
Copy link
Collaborator

Can you confirm the value for IBMCLOUD_API_KEY is not empty we are able to reproduce this issue only when the API key is empty...

@j4zzcat
Copy link
Author

j4zzcat commented May 18, 2020

Confirmed.

@j4zzcat j4zzcat closed this as completed May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants