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

Memory leak in v0.154.0 #2321

Closed
songjiaxun opened this issue Dec 23, 2023 · 1 comment · Fixed by #2329
Closed

Memory leak in v0.154.0 #2321

songjiaxun opened this issue Dec 23, 2023 · 1 comment · Fixed by #2329
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@songjiaxun
Copy link

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Is this a client library issue or a product issue? We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the Support page to reach the most relevant engineers.

If the support paths suggested above still do not result in a resolution, please provide the following details.

Environment details

  • Programming language: golang
  • OS: gcr.io/distroless/base-debian11 image
  • Language runtime version: debian11
  • Package version: v0.154.0

Steps to reproduce

In the GKE GCS FUSE CSI driver project, the google.golang.org/api package is used to communicate with the GCS storage API. We found that the feature feat(transport): add OpenTelemetry context propagation might introduce a memory leak.

In our project, we are using go.opentelemetry.io/otel v1.21.0, which is the same version this repo is using.

In our stress test, we found that the otelgrpc.newConfig for some reason cannot be cleaned up from the heap. Please see the heap profiling result:

Bm3NwNiaSiquXso

As a result, our application memory consumption grows unlimitedly over the time:

B3VcQdXrEaBoHvF

After we reverted the google.golang.org/api package version back to v0.153.0, the memory usage went back to normal:

4WKdJWnQKzVTaJE

I will DM you for the detailed reproducing and profiling steps.

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@songjiaxun songjiaxun added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 23, 2023
@codyoss codyoss assigned quartzmo and unassigned codyoss Dec 26, 2023
@codyoss
Copy link
Member

codyoss commented Dec 27, 2023

This looks likely like the same issue described here: open-telemetry/opentelemetry-go-contrib#4226 .

quartzmo added a commit to quartzmo/google-api-go-client that referenced this issue Jan 2, 2024
* Memoize otelgrpc.NewClientHandler for reuse

fixes: googleapis#2321
quartzmo added a commit that referenced this issue Jan 3, 2024
* Memoize otelgrpc.NewClientHandler for reuse

fixes: #2321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants