crossplane-contrib / provider-upjet-gcp

Official GCP Provider for Crossplane by Upbound.
Apache License 2.0
60 stars 61 forks source link

[Bug]: Memory leak on all providers #538

Open IxDay opened 3 weeks ago

IxDay commented 3 weeks ago

Is there an existing issue for this?

Affected Resource(s)

All the providers

Resource MRs required to reproduce the bug

No response

Steps to Reproduce

What happened?

The memory kept growing until pod got restarted or OOM kill, see:

Cloudplatform Screenshot from 2024-06-10 14-07-28

Redis Screenshot from 2024-06-10 14-13-56

Storage Screenshot from 2024-06-10 14-15-20

Most of those drops are restarts, curve is steeper on Cloudplatform because it is the most used in our setup. Behavior is consistent across all the modules.

Relevant Error Output Snippet

No response

Crossplane Version

1.14.5

Provider Version

1.1.0

Kubernetes Version

No response

Kubernetes Distribution

No response

Additional Info

Since we identified the culprit, I will not dig into too much details. We will publish a PR with the fix we deployed in order to discuss what should be done.

mergenci commented 3 weeks ago

@IxDay, thanks for your discovery and beautiful report 🙏 I wanted to note here that other providers are likely to be affected, in case underlying terraform providers function similarly (links to relevant lines):

  1. provider-azure
  2. provider-azuread
momilo commented 3 weeks ago

This is probably a (well-observed) generalisation of the issue I noticed with pubsub provider, noted here. I suspect that addressing this at this level would resolve also the issues I've experienced.