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

Segfault on scaleway_object_bucket import #2450

Closed
samber opened this issue Mar 12, 2024 · 2 comments
Closed

Segfault on scaleway_object_bucket import #2450

samber opened this issue Mar 12, 2024 · 2 comments
Labels
bug object Object storage issues, bugs and feature requests

Comments

@samber
Copy link

samber commented Mar 12, 2024

Terraform Version

Terraform v1.4.6
on darwin_arm64
+ provider registry.terraform.io/scaleway/scaleway v2.37.0

Affected Resource(s)

Command:

terraform import module.my_module.scaleway_object_bucket.my_bucket fr-par/my-bucket  

Output:

module.my_module.scaleway_object_bucket.my_bucket: Importing from ID "fr-par/my-bucket"...
module.my_module.scaleway_object_bucket.my_bucket: Import prepared!
  Prepared scaleway_object_bucket for import
module.my_module.scaleway_object_bucket.my_bucket: Refreshing state... [id=fr-par/my-bucket]
╷
│ Error: Request cancelled
│ 
│ The plugin.(*GRPCProvider).ReadResource request was cancelled.
╵


Stack trace from the terraform-provider-scaleway_v2.37.0 plugin:

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

goroutine 29 [running]:
github.com/scaleway/terraform-provider-scaleway/v2/scaleway.resourceScalewayObjectBucketRead({0x10195d5c0, 0x140009f7030}, 0x1400086d700, {0x101739500, 0x14000b030c0})
        github.com/scaleway/terraform-provider-scaleway/v2/scaleway/resource_object_bucket.go:466 +0x228
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x140005dcb60, {0x10195d518, 0x14000d0dbc0}, 0xd?, {0x101739500, 0x14000b030c0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:795 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0x140005dcb60, {0x10195d518, 0x14000d0dbc0}, 0x14000821520, {0x101739500, 0x14000b030c0})
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1089 +0x430
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0x1400049a018, {0x10195d518?, 0x14000d0dad0?}, 0x14000b00740)
        github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:666 +0x3e4
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0x140004e4000, {0x10195d518?, 0x14000d0d110?}, 0x140009b84e0)
        github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:774 +0x3c4
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x101910820?, 0x140004e4000}, {0x10195d518, 0x14000d0d110}, 0x1400086d180, 0x0)
        github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x140001b7200, {0x10195d518, 0x14000d0d080}, {0x101962440, 0x140001df380}, 0x14000548360, 0x140009029f0, 0x1021c5ce8, 0x0)
        google.golang.org/[email protected]/server.go:1385 +0xb8c
google.golang.org/grpc.(*Server).handleStream(0x140001b7200, {0x101962440, 0x140001df380}, 0x14000548360)
        google.golang.org/[email protected]/server.go:1796 +0xc4c
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/[email protected]/server.go:1029 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 49
        google.golang.org/[email protected]/server.go:1040 +0x150

Error: The terraform-provider-scaleway_v2.37.0 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.

Affected resource:

resource "scaleway_object_bucket" "my_bucket" {
  name       = "my-bucket"
  project_id = var.scaleway_project_id
  region     = "fr-par"
  tags = {
     ....
  }
}
@Codelax Codelax added bug object Object storage issues, bugs and feature requests labels Mar 13, 2024
@Codelax
Copy link
Member

Codelax commented Mar 13, 2024

Hi, thanks for reporting your issue, you should try updating your provider with the latest release.
Fixed in #2408, released in v2.38.0

@Codelax Codelax closed this as completed Mar 18, 2024
@samber
Copy link
Author

samber commented Mar 18, 2024

Good news. Thanks for the quick update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug object Object storage issues, bugs and feature requests
Projects
None yet
Development

No branches or pull requests

2 participants