pulumi / pulumi-awsx

AWS infrastructure best practices in component form!
https://www.pulumi.com/docs/guides/crosswalk/aws/
Apache License 2.0
222 stars 104 forks source link

Runaway Node process consuming CPU #1113

Open t0yv0 opened 11 months ago

t0yv0 commented 11 months ago

What happened?

When running example tests in this repo I noticed 3 very long-running node processes consuming CPU on my Mac machine. This seems to be Pulumi Node language hosts as far as I can tell and they're orphan processes in the sense that their process group has terminated. I think something must be wrong with self-destruct/heartbeat machinery. Not filing it to pulumi/pulumi yet as this provider is special as the provider itself is written in Node and possibly is the culprit here.

ps -eaf | grep 76892                                                                                                                                                                        ~/code/pulumi-awsx/examples/ecs/nodejs
  502 76892     1   0 Fri01PM ??       364:50.85 /Users/t0yv0/bin/node /private/var/folders/gk/cchgxh512m72f_dmkcc3d09h0000gp/T/p-it-antons-mac-ts-lb-simp-6b81ed54-1927854174/node_modules/@pulumi/pulumi/cmd/run/index.js --monitor 127.0.0.1:59921 --engine 127.0.0.1:59916 --sync /var/folders/gk/cchgxh512m72f_dmkcc3d09h0000gp/T/pulumi-node-pipes188323378 --organization organization --project ts-lb-simple --stack p-it-antons-mac-ts-lb-simp-6b81ed54 --pwd /private/var/folders/gk/cchgxh512m72f_dmkcc3d09h0000gp/T/p-it-antons-mac-ts-lb-simp-6b81ed54-1927854174 --query-mode false --parallel 2147483647 .
  502  4423  4217   0  2:46PM ttys002    0:00.00 grep 76892

Example

N/A

Output of pulumi about

v3.86.0.

Additional context

N/A

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).

mikhailshilkov commented 11 months ago

Do you have a theory about how this provider can be the cause of this, as opposed to a Core issue? Node providers are a supported scenario, so it's not wrong per se.

t0yv0 commented 11 months ago

This is going to be tricky without a solid repro. I've not worked with the internals here much yet.

There's two issues:

For the second issue we may have failed to implement heartbeat self-destruct for Node (std feature of Go providers).