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

VAULT-8630 Fix goroutine leak from RLQ initialize #17281

Merged
merged 3 commits into from
Sep 22, 2022

Conversation

VioletHynes
Copy link
Contributor

@VioletHynes VioletHynes commented Sep 22, 2022

We current have a goroutine leak since as part of creating RLQs, we create a goroutine as part of memorystore.New - however, as part of Reset, we don’t actually call Close on it. As a result, upon seal/unseal, a lot of these goroutines get stranded.

This could cause an issue with a combination of high leadership changes and high quotas.

I tested this manually and this definitely fixes things. Adding a non-manual test doesn't seem particularly easy/possible due to our existing leaks.

@VioletHynes VioletHynes marked this pull request as ready for review September 22, 2022 18:32
Copy link
Contributor

@mpalmi mpalmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one comment about a nil check

vault/quotas/quotas.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mpalmi mpalmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

Copy link
Contributor

@jasonodonnell jasonodonnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this!

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.

4 participants