-
Notifications
You must be signed in to change notification settings - Fork 898
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
Set DRb conn pool to [] after closing connections #17267
Set DRb conn pool to [] after closing connections #17267
Conversation
After forking and closing open DRb pooled connections set the pool to [] to prevent other calls calling `conn.close` on already closed connection. This prevents the following: ``` [NoMethodError]: undefined method `close' for nil:NilClass Did you mean? clone /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1258:in `close' /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1237:in `block in open' /opt/rh/rh-ruby23/root/usr/share/ruby/sync.rb:234:in `block in sync_synchronize' /opt/rh/rh-ruby23/root/usr/share/ruby/sync.rb:231:in `handle_interrupt' /opt/rh/rh-ruby23/root/usr/share/ruby/sync.rb:231:in `sync_synchronize' /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1235:in `open' /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1141:in `block in method_missing' /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1160:in `with_friend' /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1140:in `method_missing' lib/gems/pending/VMwareWebService/MiqVimBroker.rb:419:in `getMiqVim' ``` https://bugzilla.redhat.com/show_bug.cgi?id=1562401
Checked commit agrare@76309b9 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
/cc @jrafanie |
For future reference, this was introduced in this PR: #16953 It was backported to gaprindashvili, fine, euwe, and has the darga/yes flag |
😅 🤦♂️ |
Set DRb conn pool to [] after closing connections (cherry picked from commit 142129e) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1566256
Set DRb conn pool to [] after closing connections (cherry picked from commit 142129e) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1566255
Gaprindashvili backport details:
|
Fine backport details:
|
…fter_fork Set DRb conn pool to [] after closing connections (cherry picked from commit 142129e) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1566256
Hello, i have this issue. i added the line to miq_worker.rb. ive to do something additional, because the problem still present when i try to do an smart state analysis. |
Hey @dfmanguia what version are you using? |
Hello again, im using Version 5.9.2.4.20180501195858_35dc609 note that im using CLOUDFROMS FROM redhat. what do you think about it? |
@dfmanguia From a quick glance, that version should have that fix already so you shouldn't have needed to do that. Are you sure it's that version and the line didn't already exist there? It's probably a different source of the error. Can you contact Red Hat support with the logs showing the backtrace for the error? |
Well, actually i updated cf and the version is 5.9.2.4, yes the code is by default there. yesterday i was outdate so thats why the line wasnt there. But the problem still there. |
@dfmanguia did you stop all processes before updating? We fork processes so if the parent evm_server process isn't restarted, any new workers that are restarted will not pick up any code changes provided by an update. |
@dfmanguia is it the same backtraces or just the same exception? |
If it is repeatedly happening on vms and not hosts I'd bet it is not the same issue as this. This was extremely rare and hard to reproduce on a live appliance. |
@dfmanguia Yeah, I suggest you open a support ticket and possibly remove the screenshot containing hostnames, etc. I hid the comment but it's still there. There's no private comment in public github. |
is any process to add scvmm as provider to cloudforms, maybe im missing something?, i can see the hosts and the vms, but i want scanstate this vm and got this problem? |
Im working in this, and in the logs appear this. seem like no Hostname defined] where ive to configure this? |
@dfmanguia this PR is not the place to discuss as this is not related to your issue and is cluttering the history, please open a support case with red hat support or at least open a separate GitHub issue for the problem you're having. |
After forking and closing open DRb pooled connections set the pool to []
to prevent other calls calling
conn.close
on already closedconnection. This prevents the following:
After a successful call DRbConn.open pops a connection off the pool and closes it, https://github.com/ruby/ruby/blob/v2_3_7/lib/drb/drb.rb#L1237
And
#close
doesn't check if@protocol
is nil before calling@protocol.close
, https://github.com/ruby/ruby/blob/v2_3_7/lib/drb/drb.rb#L1258https://bugzilla.redhat.com/show_bug.cgi?id=1562401https://bugzilla.redhat.com/show_bug.cgi?id=1566198