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

SIGSEGV with RouteTableAssociation on pulumi-aws 4.11.0 and up #1575

Closed
wimax-grapl opened this issue Jul 20, 2021 · 5 comments
Closed

SIGSEGV with RouteTableAssociation on pulumi-aws 4.11.0 and up #1575

wimax-grapl opened this issue Jul 20, 2021 · 5 comments
Assignees
Labels
impact/panic This bug represents a panic or unexpected crash kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@wimax-grapl
Copy link

wimax-grapl commented Jul 20, 2021

Steps to reproduce

Sorry - I don't have a super tight repro for this.

Here's the requirements I'm working with, among others:

pulumi==3.7.1
pulumi-aws==4.11.0 # <----- 
pulumi-docker==3.0.0
pulumi-kafka==3.0.1
pulumi-random==4.2.0

Works fine with 4.10.0, breaks with 4.11 thru 4.13. # EDIT: MAY ALSO BE BROKEN WITH 4.10.0

The code that causes this error:

        for subnet in self.public_subnets:
            name = f"route-for-{subnet._name}"
            route_table = aws.ec2.RouteTable(
                name,
                vpc_id=self.vpc.id,
                routes=[
                    aws.ec2.RouteTableRouteArgs(
                        cidr_block="0.0.0.0/0",
                        gateway_id=self.internet_gateway.id,
                    )
                ],
                tags={"Name": name},
                opts=pulumi.ResourceOptions(parent=subnet),
            )

            aws.ec2.RouteTableAssociation( # <-------- This RouteTableAssociation
                f"assoc-{subnet._name}",
                subnet_id=subnet.id,
                route_table_id=route_table.id,
                opts=pulumi.ResourceOptions(parent=subnet),
            )

Expected:
a pulumi up works without a SIGSEGV

Actual:

 +  aws:ec2:RouteTable route-for-grapl-network-us-east-1b-public-subnet creating 
 +  aws:ec2:RouteTable route-for-grapl-network-us-east-1a-public-subnet created 
 +  aws:ec2:RouteTableAssociation assoc-grapl-network-us-east-1a-public-subnet creating 
 +  pulumi:pulumi:Stack grapl-local-grapl creating panic: runtime error: invalid memory address or nil pointer dereference
 +  pulumi:pulumi:Stack grapl-local-grapl creating [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x49c0bc3]
 +  pulumi:pulumi:Stack grapl-local-grapl creating goroutine 5398 [running]:
 +  pulumi:pulumi:Stack grapl-local-grapl creating github.com/terraform-providers/terraform-provider-aws/aws/internal/service/ec2/finder.RouteTableAssociationByID(0xc002585eb0, 0xc0016db848, 0x11, 0x2, 0x2, 0xc00280c5a0)
 +  pulumi:pulumi:Stack grapl-local-grapl creating      /home/runner/go/pkg/mod/github.com/pulumi/[email protected]/aws/internal/service/ec2/finder/finder.go:295 +0x223
 +  pulumi:pulumi:Stack grapl-local-grapl creating github.com/terraform-providers/terraform-provider-aws/aws/internal/service/ec2/waiter.RouteTableAssociationState.func1(0xc000503ee0, 0xc000503ea0, 0x0, 0x0, 0x2, 0xc000503f01)
 +  pulumi:pulumi:Stack grapl-local-grapl creating      /home/runner/go/pkg/mod/github.com/pulumi/[email protected]/aws/internal/service/ec2/waiter/status.go:291 +0x45
 +  pulumi:pulumi:Stack grapl-local-grapl creating github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.(*StateChangeConf).WaitForStateContext.func1(0xc0005b8840, 0xc000310150, 0xc0018ae420, 0xc0018a0c00, 0xc001691ef0, 0xc001691ee8)
 +  pulumi:pulumi:Stack grapl-local-grapl creating      /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/[email protected]/helper/resource/state.go:110 +0x2e9
 +  pulumi:pulumi:Stack grapl-local-grapl creating created by github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.(*StateChangeConf).WaitForStateContext
 +  pulumi:pulumi:Stack grapl-local-grapl creating      /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/[email protected]/helper/resource/state.go:83 +0x1c6
 +  aws:lambda:Function engagement-creator-Handler-lambda creating error: transport is closing
 +  aws:ec2:RouteTable route-for-grapl-network-us-east-1b-private-subnet creating error: transport is closing
 +  aws:ec2:RouteTableAssociation assoc-grapl-network-us-east-1a-public-subnet creating error: transport is closing
@wimax-grapl wimax-grapl added the kind/bug Some behavior is incorrect or out of spec label Jul 20, 2021
@wimax-grapl
Copy link
Author

(NOTE: This may actually be breaking at 4.10)

@wimax-grapl
Copy link
Author

I can't find the exact version of the file Pulumi is using, but here's where it is in latest terraform-provider-aws:

https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/internal/service/ec2/finder/finder.go#L295

@leezen
Copy link
Contributor

leezen commented Jul 20, 2021

I suspect this may be related to hashicorp/terraform-provider-aws#19985

@leezen leezen added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). p1 A bug severe enough to be the next item assigned to an engineer impact/panic This bug represents a panic or unexpected crash labels Jul 20, 2021
@wimax-grapl
Copy link
Author

Thanks for the quick followup 🙏 yeah deff looks like something upstream

@leezen leezen removed the p1 A bug severe enough to be the next item assigned to an engineer label Jul 21, 2021
@stack72
Copy link
Contributor

stack72 commented Nov 15, 2021

This was fixed and released in v4.24.0 of the pulumi-aws provider

Apologies for not posting that before

@stack72 stack72 added resolution/fixed This issue was fixed and removed awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). labels Nov 15, 2021
@stack72 stack72 added this to the 0.65 milestone Nov 15, 2021
@stack72 stack72 closed this as completed Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/panic This bug represents a panic or unexpected crash kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

3 participants