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 unbounded memory growth for Ruby <2.7. #8429

Merged
merged 4 commits into from Mar 29, 2021

Conversation

haberman
Copy link
Member

Previously our secondary map (needed only on Ruby <2.7) was growing without bound.

This PR adds a periodic GC pass of the secondary map to avoid this unbounded memory growth.

Fixes: #8421

@google-cla google-cla bot added the cla: yes label Mar 25, 2021
@haberman haberman changed the base branch from master to 3.15.x March 25, 2021 18:49
We now hold the mutex for both map insertions, to protect
against a concurrent GC that removes from the seconary map
before we can insert into the weak map.
@haberman haberman merged commit a38319b into protocolbuffers:3.15.x Mar 29, 2021
@haberman haberman deleted the ruby-gc-secondarymap branch April 20, 2021 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory Leak in Ruby gem as of 3.15.x
3 participants