Change in vdsm[master]: xmlrpc: fd leak fix

fromani at redhat.com fromani at redhat.com
Tue Apr 14 15:11:32 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: xmlrpc: fd leak fix
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/39506/3/lib/yajsonrpc/betterAsyncore.py
File lib/yajsonrpc/betterAsyncore.py:

Line 160:                 raise
Line 161: 
Line 162:     def del_channel(self, map=None):
Line 163:         try:
Line 164:             del asyncore.socket_map[self._fileno]
> I checked and we need it to be garbage collectable.
I managed to find some time to have a better grasp o asyncore & friends. I believe there are cases on which we create a Dispatcher class (or a subclass of) with default map argument, thus the global asyncore socket_map is used.

This should be the root cause.

For a different patch: should be cleaner and safer if we make sure to always use the same map, e.g. Reactor's map.
Line 165:         except KeyError:
Line 166:             pass
Line 167:         asyncore.dispatcher.del_channel(self, map)
Line 168:         self._unbind_implementation()


-- 
To view, visit https://gerrit.ovirt.org/39506
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I705b0cf39937fe8d175305ad8ea8ad615f3ffb49
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list