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

AWS Classic wafv2 with Go leading to crashes #2250

Closed
alexandr-x-ursul opened this issue Dec 6, 2022 · 3 comments
Closed

AWS Classic wafv2 with Go leading to crashes #2250

alexandr-x-ursul opened this issue Dec 6, 2022 · 3 comments
Assignees
Labels
area/import An issue related to `pulumi import` or the import resource option. impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@alexandr-x-ursul
Copy link

What happened?

My goal was to import and codify an AWS WAF resource. After importing the resource and adding generated code,
I attempted to run pulumi up. Pulumi took a good long while, more than usual, and then crashed, failing to run the update command. The codegen on import also took an unusually long time, and on one occasion also crashed in the same fashion, however I could not reliably reproduce that.

To me there seems to be some memory issue at play here, during pulumi up I was observing my memory usage steadily climbing for the terminal application up to 16GB RAM, before it would crash (I have 32GB total). Perhaps related to pulumi/pulumi#8950?

Steps to reproduce

$ pulumi import aws:wafv2/webAcl:WebAcl main-web-acl-prod xxx/xxx/REGIONAL --parent main='xxx'
Previewing import (xxx/prod)

     Type                    Name               Plan
     pulumi:pulumi:Stack     xxx-prod
     └─ xxx   main
 =      └─ aws:wafv2:WebAcl  main-web-acl-prod  import

Resources:
= 1 to import
51 unchanged

Do you want to perform this import? yes
Importing (xxx/prod)

     Type                    Name               Status
     pulumi:pulumi:Stack     xxx-prod
     └─ xxx   main
 =      └─ aws:wafv2:WebAcl  main-web-acl-prod  imported (2s)

$ time pulumi up
Previewing update (xxx/prod)

     Type                 Name              Plan     Info
     pulumi:pulumi:Stack  xxx-prod           1 error; 1 message

Diagnostics:
pulumi:pulumi:Stack (xxx-prod):

    go build github.com/pulumi/pulumi-aws/sdk/v5/go/aws/wafv2: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed

    error: error in compiling Go: unable to run `go build`: exit status 1

real 2m18.418s
user 0m0.772s
sys 0m2.346s

Expected Behavior

Pulumi should have completed the update command and reported any changes.

Actual Behavior

Pulumi crashed.

Output of pulumi about

CLI
Version 3.48.0
Go Version go1.19.2
Go Compiler gc

Plugins
NAME VERSION
aws 5.21.1
aws-native 0.43.0
go unknown

Host
OS ubuntu
Version 20.04
Arch x86_64

This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.19.2 linux/amd64'

// EDITED OUT STACK

Found no pending operations associated with xxx/prod

Backend
Name pulumi.com
URL https://app.pulumi.com/xxx
User xxx
Organizations xxx, xxx

Dependencies:
NAME VERSION
github.com/pulumi/pulumi-aws-native/sdk 0.43.0
github.com/pulumi/pulumi-aws/sdk/v5 5.21.1
github.com/pulumi/pulumi/sdk/v3 3.48.0
pkg/database 0.0.0-00010101000000-000000000000
pkg/environment 0.0.0-00010101000000-000000000000
pkg/nfs 0.0.0-00010101000000-000000000000

Additional context

The WAF has 10 rules and uses up ~1000 WCU to given an idea of its complexity.
There are no issues with the go code as far as I or my IDE can see.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@roothorp
Copy link
Contributor

roothorp commented Dec 6, 2022

Hi @alexandr-x-ursul, thanks for the issue! I believe this issue is occuring because of the complexity of the resources you are trying to import, which is causing the memory issues. In this case it is probably best to wait for pulumi/pulumi#11552 to be resolved and attempt this in aws-native, if that is acceptable.

@roothorp roothorp added impact/usability Something that impacts users' ability to use the product easily and intuitively area/import An issue related to `pulumi import` or the import resource option. and removed needs-triage Needs attention from the triage team labels Dec 6, 2022
@alexandr-x-ursul
Copy link
Author

Hi @alexandr-x-ursul, thanks for the issue! I believe this issue is occuring because of the complexity of the resources you are trying to import, which is causing the memory issues. In this case it is probably best to wait for pulumi/pulumi#11552 to be resolved and attempt this in aws-native, if that is acceptable.

Hi, I actually raised that issue in aws-native as well. In fact I've already attempted to do this with aws-native, hence:
pulumi/pulumi#11552
pulumi/pulumi-aws-native#725

@mikhailshilkov
Copy link
Member

This will be fixed by #2589 in 6.0 of the provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/import An issue related to `pulumi import` or the import resource option. impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
3 participants