Skip to content

Panic: Invalid memory address crash #138

@jorgeparavicini

Description

@jorgeparavicini

I'm using CDKTF with the ClickHouse DBOps v1.60-alpha1 version. When deploying a stack which creates some roles with grants it crashes with the following error message:

Stack trace from the terraform-provider-clickhousedbops_v1.6.0-alpha1 plugin:

                       panic: runtime error: invalid memory address or nil pointer dereference
                       [signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1051c756c]

                       goroutine 341 [running]:
                       github.com/ClickHouse/terraform-provider-clickhousedbops/pkg/resource/user.(*Resource).Create(0x14000798e40, {0x1056f7d78, 0x14000797dd0}, {{{{0x1056ff3b0, 0x14000614c00}, {0x1055760a0, 0x140006149f0}}, {0x105705518, 0x14000d004b0}}, {{{0x1056ff3b0, ...}, ...}, ...}, ...}, ...)
                        github.com/ClickHouse/terraform-provider-clickhousedbops/pkg/resource/user/user.go:219 +0x54c
                       github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).CreateResource(0x1400025c308, {0x1056f7d78, 0x14000797dd0}, 0x140006f34c0, 0x140006f3490)
                        github.com/hashicorp/terraform-plugin-framework@v1.16.1/internal/fwserver/server_createresource.go:127 +0x644
prod-clickhouse-users  github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ApplyResourceChange(0x1400025c308, {0x1056f7d78, 0x14000797dd0}, 0x140001fd0a0, 0x140006f35e8)
                        github.com/hashicorp/terraform-plugin-framework@v1.16.1/internal/fwserver/server_applyresourcechange.go:63 +0x434
                       github.com/hashicorp/terraform-plugin-framework/internal/proto6server.(*Server).ApplyResourceChange(0x1400025c308, {0x1056f7d78?, 0x14000797ce0?}, 0x140003bfd10)
                        github.com/hashicorp/terraform-plugin-framework@v1.16.1/internal/proto6server/server_applyresourcechange.go:71 +0x430
                       github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ApplyResourceChange(0x1400024bae0, {0x1056f7d78?, 0x140007974a0?}, 0x14000483980)
                        github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov6/tf6server/server.go:944 +0x294
                       github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ApplyResourceChange_Handler({0x1056cdae0, 0x1400024bae0}, {0x1056f7d78, 0x140007974a0}, 0x14000483900, 0x0)
                        github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:789 +0x1c0
prod-clickhouse-users  google.golang.org/grpc.(*Server).processUnaryRPC(0x14000246200, {0x1056f7d78, 0x140007973e0}, 0x14000c08600, 0x140002b3e60, 0x105f66fa8, 0x0)
                        google.golang.org/grpc@v1.76.0/server.go:1431 +0xc9c
                       google.golang.org/grpc.(*Server).handleStream(0x14000246200, {0x1056f89c8, 0x1400041c000}, 0x14000c08600)
                        google.golang.org/grpc@v1.76.0/server.go:1842 +0x900
                       google.golang.org/grpc.(*Server).serveStreams.func2.1()
                        google.golang.org/grpc@v1.76.0/server.go:1061 +0x84
                       created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 23
                        google.golang.org/grpc@v1.76.0/server.go:1072 +0x138

                       Error: The terraform-provider-clickhousedbops_v1.6.0-alpha1 plugin crashed!

                       This is always indicative of a bug within the plugin. It would be immensely
                       helpful if you could report the crash with the plugin's maintainers so that it
                       can be fixed. The output above should help diagnose the issue.

I'm unsure what data would be relevant, i'd be happy to provide additional information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions