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

fix: Memory leak in repo-server #20876

Merged

Conversation

AJChandler
Copy link
Contributor

@AJChandler AJChandler commented Nov 20, 2024

This resolves a memory leak in the repo-server during plugin discovery caused by the connection not being closed.

Repo-Server Goroutines Leak
Screenshot 2024-11-20 at 3 21 32 PM

goroutine profile: total 1500
1458 @ 0x474eae 0x450a25 0x23d30ec 0x47d741
#	0x23d30eb	google.golang.org/grpc/internal/grpcsync.(*CallbackSerializer).run+0x10b	/go/pkg/mod/google.golang.org/grpc@v1.66.2/internal/grpcsync/callback_serializer.go:88

Repo-Server Goroutines Leak - Hard Refresh Applications x2
Screenshot 2024-11-20 at 3 28 43 PM

goroutine profile: total 4842
3138 @ 0x474eae 0x450a25 0x23d30ec 0x47d741
#	0x23d30eb	google.golang.org/grpc/internal/grpcsync.(*CallbackSerializer).run+0x10b	/go/pkg/mod/google.golang.org/grpc@v1.66.2/internal/grpcsync/callback_serializer.go:88

Fix Applied - Repo-Server Goroutines Leak - Hard Refresh Applications x2
Screenshot 2024-11-20 at 4 02 11 PM

Introduced by: #20196

Related improvement that would make this class of error harder to occur: #20217

This should be cherry-picked into the v2.13 release.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Signed-off-by: Adam Chandler <adam_chandler@trimble.com>
@AJChandler AJChandler requested a review from a team as a code owner November 20, 2024 22:39
Copy link

bunnyshell bot commented Nov 20, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 55.04%. Comparing base (fc9b33b) to head (3b07c91).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
util/app/discovery/discovery.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #20876      +/-   ##
==========================================
+ Coverage   55.00%   55.04%   +0.04%     
==========================================
  Files         324      324              
  Lines       55398    55400       +2     
==========================================
+ Hits        30471    30497      +26     
+ Misses      22309    22279      -30     
- Partials     2618     2624       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crenshaw-dev crenshaw-dev merged commit c6804e9 into argoproj:master Nov 21, 2024
28 checks passed
@crenshaw-dev
Copy link
Member

/cherry-pick release-2.13

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Nov 21, 2024
Signed-off-by: Adam Chandler <adam_chandler@trimble.com>
crenshaw-dev pushed a commit that referenced this pull request Nov 21, 2024
Signed-off-by: Adam Chandler <adam_chandler@trimble.com>
Co-authored-by: Adam Chandler <31355738+AJChandler@users.noreply.github.com>
adriananeci pushed a commit to adriananeci/argo-cd that referenced this pull request Dec 4, 2024
Signed-off-by: Adam Chandler <adam_chandler@trimble.com>
Signed-off-by: Adrian Aneci <aneci@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants