-
Notifications
You must be signed in to change notification settings - Fork 909
DRb TimerIdConv cleanup #8399
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
DRb TimerIdConv cleanup #8399
Conversation
Please review |
@@ -238,6 +238,9 @@ def self.teardown_drb_for_ruby_method | |||
DRb.stop_service | |||
# Set the ID conv to nil so that the cache can be GC'ed | |||
DRb.install_id_conv(nil) | |||
holder = @@global_id_conv.instance_variable_get('@holder') | |||
holder.instance_variable_get('@keeper').try(:kill) if holder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking to see if there's a better way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please link to this for context and this so we can clean this up if they fix it in 2.3.2 or later. Please put a comment about what we're doing because it's not obvious at all.
@mkanoor Can you review this: https://bugs.ruby-lang.org/issues/12342 ? |
https://bugzilla.redhat.com/show_bug.cgi?id=1321934 The TimerIdConv thread was not being terminated after a method ends. The TimerIdConv thread sleeps for a hour before it GC's the objects
Checked commit mkanoor@1428c1e with ruby 2.2.3, rubocop 0.37.2, and haml-lint 0.16.1 |
DRb TimerIdConv cleanup (cherry picked from commit 2c98312)
https://bugzilla.redhat.com/show_bug.cgi?id=1321934
The TimerIdConv thread was not being terminated after a method ends.
The TimerIdConv thread sleeps for a hour before it GC's the objects
Here is an example of the thread count growth, but simplified outside of automate
Thread count slowly rises:
Opened a ruby bug to see if we can fix this in ruby or through a cleaner API: https://bugs.ruby-lang.org/issues/12342 ?