Skip to content

Plugin crashes on pulumi refresh #150

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

Closed
kralikba opened this issue Mar 17, 2021 · 5 comments · Fixed by #151
Closed

Plugin crashes on pulumi refresh #150

kralikba opened this issue Mar 17, 2021 · 5 comments · Fixed by #151
Assignees
Labels
emergent An issue that was added to the current milestone after planning kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@kralikba
Copy link

kralikba commented Mar 17, 2021

I have a complex pulumi program in C# which has been working fine.

When running pulumi refresh after having updated to version 2.14 of this plugin, 2.22.0 of package Pulumi and 2.22.0 of the windows CLI, the plugin crashes. Note that it lets pulumi up run just fine, which does not recognize a need to update the cloudflare records.

(Do pardon me to not following the general bug report template, but I really don't know what to write there.)

Stack trace is as follows.

panic: runtime error: invalid memory address or nil pointer dereference
    [signal 0xc0000005 code=0x0 addr=0x0 pc=0x17ff693]
    goroutine 40 [running]:
    github.com/cloudflare/terraform-provider-cloudflare/cloudflare.resourceCloudflareRecordRead(0xc000a402a0, 0x1f0c8a0, 0xc000180cc0, 0xc000a402a0, 0x0)
        /home/runner/go/pkg/mod/github.com/cloudflare/terraform-provider-cloudflare@v1.18.2-0.20210310224832-c97989b11d33/cloudflare/resource_cloudflare_record.go:442 +0xad3
    github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Refresh(0xc00090c5a0, 0xc000a48730, 0x1f0c8a0, 0xc000180cc0, 0xc000420ae0, 0x4020101, 0x2)
        /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.16.0/helper/schema/resource.go:516 +0x182
    github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Refresh(0xc0004eae80, 0xc000aa75d8, 0xc000a48730, 0x11, 0xc000a46140, 0x20)
        /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.16.0/helper/schema/provider.go:333 +0x96
    github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfshim/sdk-v1.v1Provider.Refresh(0xc0004eae80, 0x1f226c0, 0x11, 0x21af3a0, 0xc000c9a800, 0xc000a46140, 0x20, 0xc000a446f0, 0xc000a78120)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.21.0/pkg/tfshim/sdk-v1/provider.go:102 +0xd5
    github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Read(0xc0000023c0, 0x21ae488, 0xc000a449c0, 0xc000a48280, 0xc0000023c0, 0x1d4ba01, 0xc00069ea40)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.21.0/pkg/tfbridge/provider.go:879 +0x6a6
    github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Read_Handler.func1(0x21ae488, 0xc000a449c0, 0x1e85f80, 0xc000a48280, 0x1e9f560, 0x2aa67c8, 0x21ae488, 0xc000a449c0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.22.1-0.20210310211618-1f16423ede4c/proto/go/provider.pb.go:2287 +0x8d
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x21ae488, 0xc000a444e0, 0x1e85f80, 0xc000a48280, 0xc000a62120, 0xc000286378, 0x0, 0x0, 0x218c920, 0xc000278d30)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x31c
    github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Read_Handler(0x1ed6b80, 0xc0000023c0, 0x21ae488, 0xc000a444e0, 0xc000a60120, 0xc00007bfc0, 0x21ae488, 0xc000a444e0, 0xc0001dac00, 0x3e7)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.22.1-0.20210310211618-1f16423ede4c/proto/go/provider.pb.go:2289 +0x15e
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004e2a80, 0x21bb118, 0xc0004fd380, 0xc000316300, 0xc000910ff0, 0x2a4e360, 0x0, 0x0, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:1210 +0x52b
    google.golang.org/grpc.(*Server).handleStream(0xc0004e2a80, 0x21bb118, 0xc0004fd380, 0xc000316300, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:1533 +0xd0c
    google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0009860c0, 0xc0004e2a80, 0x21bb118, 0xc0004fd380, 0xc000316300)
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:871 +0xb2
    created by google.golang.org/grpc.(*Server).serveStreams.func1
        /home/runner/go/pkg/mod/google.golang.org/grpc@v1.34.0/server.go:869 +0x1fd
@kralikba kralikba added the kind/bug Some behavior is incorrect or out of spec label Mar 17, 2021
@mgranderath
Copy link

Having the exact same issue since this morning. Was still working without any issues last night. I didn't update any of the packages. This is pretty urgent as this is hindering me from deploying completely.

@kralikba
Copy link
Author

Having the exact same issue since this morning. Was still working without any issues last night. I didn't update any of the packages. This is pretty urgent as this is hindering me from deploying completely.

FYI: my fix was to revert to an earlier stack state (only .pulumi/stack.json, not the code) and downgrade every dependency so that it worked with Pulumi package v. 2.11.2, do a refresh, then upgrade to latest, then do a refresh and an up. I have no idea what was happening in the background.

@viveklak
Copy link
Contributor

@kralikba did you downgrade the cloudflare provider version as well?

@casey-robertson
Copy link

FWIW running into this too. Last successful pipeline ran @pulumi/cloudflare@2.13.1. When running with @pulumi/cloudflare@2.14.0 it panics.

@viveklak viveklak added emergent An issue that was added to the current milestone after planning kind/bug Some behavior is incorrect or out of spec and removed kind/bug Some behavior is incorrect or out of spec labels Mar 19, 2021
@viveklak
Copy link
Contributor

This seems to be a manifestation of cloudflare/terraform-provider-cloudflare#992.

@stack72 I think we might need to bump to 2.19.2 of the TF provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emergent An issue that was added to the current milestone after planning kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants