rollbar / terraform-provider-rollbar

Terraform provider for Rollbar
https://rollbar.com
MIT License
28 stars 13 forks source link

v1.10 crashing #351

Closed bwmetcalf closed 1 year ago

bwmetcalf commented 1 year ago
on darwin_amd64
...
+ provider registry.terraform.io/rollbar/rollbar v1.10.0

This appears to be similar to the issue described in #340

   5: resource "rollbar_project_access_token" "default" {

The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more
details.

Stack trace from the terraform-provider-rollbar_v1.10.0 plugin:

fatal error: concurrent map read and map write
{"level":"debug","projectID":544399,"token":"da0e81c6b79343458294404e64f80577","time":"2023-02-18T11:09:11-06:00","message":"Reading project access token"}
{"level":"debug","projectID":544399,"time":"2023-02-18T11:09:11-06:00","message":"Listing project access tokens"}

goroutine 421 [running]:
runtime.throw({0x1813545, 0xc0005b58c0})
    runtime/panic.go:1198 +0x71 fp=0xc000232450 sp=0xc000232420 pc=0x10332b1
runtime.mapaccess1_faststr(0x0, 0x0, {0x180d7ac, 0x1b})
    runtime/map_faststr.go:21 +0x3a5 fp=0xc0002324b8 sp=0xc000232450 pc=0x1012205
github.com/go-resty/resty/v2.parseRequestHeader(0xc0000fe540, 0xc00052c000)
    github.com/go-resty/resty/v2@v2.5.0/middleware.go:101 +0xd5 fp=0xc0002325f8 sp=0xc0002324b8 pc=0x16336b5
github.com/go-resty/resty/v2.(*Client).execute(0xc0000fe540, 0xc00052c000)
    github.com/go-resty/resty/v2@v2.5.0/client.go:850 +0x23f fp=0xc0002327e0 sp=0xc0002325f8 pc=0x1631a9f
github.com/go-resty/resty/v2.(*Request).Execute.func1()
    github.com/go-resty/resty/v2@v2.5.0/request.go:725 +0x89 fp=0xc000232848 sp=0xc0002327e0 pc=0x163a649
github.com/go-resty/resty/v2.Backoff(0xc000232a38, {0xc0001aca18, 0x4, 0xc0005b58c0})
    github.com/go-resty/resty/v2@v2.5.0/retry.go:93 +0x171 fp=0xc000232948 sp=0xc000232848 pc=0x163bc91
github.com/go-resty/resty/v2.(*Request).Execute(0xc00052c000, {0x17fba72, 0x1800dce}, {0xc00061a340, 0x3f})
    github.com/go-resty/resty/v2@v2.5.0/request.go:719 +0x4b0 fp=0xc000232a90 sp=0xc000232948 pc=0x163a490
github.com/go-resty/resty/v2.(*Request).Get(...)
    github.com/go-resty/resty/v2@v2.5.0/request.go:645
github.com/rollbar/terraform-provider-rollbar/client.(*RollbarAPIClient).ListProjectAccessTokens(0xc0000ba4b0, 0x180e4bf)
    github.com/rollbar/terraform-provider-rollbar/client/project_access_token.go:181 +0x6e7 fp=0xc000232f20 sp=0xc000232a90 pc=0x1670127
github.com/rollbar/terraform-provider-rollbar/client.(*RollbarAPIClient).ReadProjectAccessToken(0xc00033d800, 0x31, {0xc0008962c0, 0xc0002777e0})
    github.com/rollbar/terraform-provider-rollbar/client/project_access_token.go:206 +0x40c fp=0xc0002333f0 sp=0xc000232f20 pc=0x167066c
github.com/rollbar/terraform-provider-rollbar/rollbar.resourceProjectAccessTokenRead({0x19141f8, 0xc0000a8800}, 0xc00023bb80, {0x172f2a0, 0xc00051e180})
    github.com/rollbar/terraform-provider-rollbar/rollbar/resource_project_access_token.go:174 +0x4b8 fp=0xc000233850 sp=0xc0002333f0 pc=0x168f778
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc000278620, {0x19141f8, 0xc0000a8800}, 0x24, {0x172f2a0, 0xc00051e180})
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:358 +0x12e fp=0xc0002338c8 sp=0xc000233850 pc=0x15f9d4e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000278620, {0x19141f8, 0xc0000a8800}, 0xc00023cb60, {0x172f2a0, 0xc00051e180})
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:635 +0x35b fp=0xc000233958 sp=0xc0002338c8 pc=0x15fb87b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00000d308, {0x19141f8, 0xc0000a8800}, 0xc0000a8880)
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:576 +0x534 fp=0xc000233a68 sp=0xc000233958 pc=0x15f1334
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc000049180, {0x19142a0, 0xc0004997a0}, 0xc000a02660)
    github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:553 +0x3b0 fp=0xc000233b70 sp=0xc000233a68 pc=0x14da2f0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x17d25e0, 0xc000049180}, {0x19142a0, 0xc0004997a0}, 0xc000a025a0, 0x0)
    github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x170 fp=0xc000233bc8 sp=0xc000233b70 pc=0x14c9390
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000272a80, {0x1921438, 0xc00041c000}, 0xc0004f8300, 0xc000345e60, 0x1e05f70, 0x0)
    google.golang.org/grpc@v1.36.0/server.go:1217 +0xc8f fp=0xc000233e48 sp=0xc000233bc8 pc=0x1433e0f
google.golang.org/grpc.(*Server).handleStream(0xc000272a80, {0x1921438, 0xc00041c000}, 0xc0004f8300, 0x0)
    google.golang.org/grpc@v1.36.0/server.go:1540 +0xa2a fp=0xc000233f68 sp=0xc000233e48 pc=0x14379ea
google.golang.org/grpc.(*Server).serveStreams.func1.2()
    google.golang.org/grpc@v1.36.0/server.go:878 +0x98 fp=0xc000233fe0 sp=0xc000233f68 pc=0x1431ab8
runtime.goexit()
    runtime/asm_amd64.s:1581 +0x1 fp=0xc000233fe8 sp=0xc000233fe0 pc=0x10635c1
created by google.golang.org/grpc.(*Server).serveStreams.func1
    google.golang.org/grpc@v1.36.0/server.go:876 +0x294

goroutine 1 [select]:
github.com/hashicorp/go-plugin.Serve(0xc000207a28)
    github.com/hashicorp/go-plugin@v1.4.1/server.go:469 +0x1453
github.com/hashicorp/terraform-plugin-sdk/v2/plugin.Serve(0xc0001008a0)
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/plugin/serve.go:147 +0x905
main.main()
    github.com/rollbar/terraform-provider-rollbar/main.go:54 +0x607

goroutine 6 [select]:
github.com/hashicorp/go-plugin.(*gRPCBrokerServer).Recv(0x182ccc3)
    github.com/hashicorp/go-plugin@v1.4.1/grpc_broker.go:121 +0x6d
github.com/hashicorp/go-plugin.(*GRPCBroker).Run(0xc0001157c0)
    github.com/hashicorp/go-plugin@v1.4.1/grpc_broker.go:411 +0x48
created by github.com/hashicorp/go-plugin.(*GRPCServer).Init
    github.com/hashicorp/go-plugin@v1.4.1/grpc_server.go:85 +0x4a9

goroutine 7 [IO wait]:
internal/poll.runtime_pollWait(0x26c0890, 0x72)
    runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0xc000100de0, 0xc0001da000, 0x1)
    internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000100de0, {0xc0001da000, 0x1000, 0x1000})
    internal/poll/fd_unix.go:167 +0x25a
os.(*File).read(...)
    os/file_posix.go:32
os.(*File).Read(0xc00000ea50, {0xc0001da000, 0x400, 0x16fc600})
    os/file.go:119 +0x5e
bufio.(*Reader).Read(0xc000078f40, {0xc0001dc000, 0x400, 0x0})
    bufio/bufio.go:227 +0x1b4
github.com/hashicorp/go-plugin.copyChan({0x192b0b0, 0xc000048d80}, 0x0, {0x1902c40, 0xc00000ea50})
    github.com/hashicorp/go-plugin@v1.4.1/grpc_stdio.go:181 +0x1f6
created by github.com/hashicorp/go-plugin.newGRPCStdioServer
    github.com/hashicorp/go-plugin@v1.4.1/grpc_stdio.go:37 +0xfa

goroutine 8 [IO wait]:
internal/poll.runtime_pollWait(0x26c06b0, 0x72)
    runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0xc000100ea0, 0xc0000b6000, 0x1)
    internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
    internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000100ea0, {0xc0000b6000, 0x1000, 0x1000})
    internal/poll/fd_unix.go:167 +0x25a
os.(*File).read(...)
    os/file_posix.go:32
os.(*File).Read(0xc00000ea60, {0xc0000b6000, 0x400, 0x16fc600})
    os/file.go:119 +0x5e
bufio.(*Reader).Read(0xc000079740, {0xc0000b8000, 0x400, 0x0})
    bufio/bufio.go:227 +0x1b4
github.com/hashicorp/go-plugin.copyChan({0x192b0b0, 0xc000048d80}, 0x0, {0x1902c40, 0xc00000ea60})
    github.com/hashicorp/go-plugin@v1.4.1/grpc_stdio.go:181 +0x1f6

Error: The terraform-provider-rollbar_v1.10.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.

Please let me know if more information is needed.

ghost commented 1 year ago

Hey @bwmetcalf, Let me check what's happening here. My hunch says this rather connected to https://github.com/rollbar/terraform-provider-rollbar/issues/346 We're working on fixing that already.

bwmetcalf commented 1 year ago

Hey @bwmetcalf, Let me check what's happening here. My hunch says this rather connected to #346 We're working on fixing that already.

Thanks.

bwmetcalf commented 1 year ago

I'll close this one and track #346. This seems to be the same issue.