Change in vdsm[master]: virt: Handle fork() related issues in vmchannels/guestagent

vfeenstr at redhat.com vfeenstr at redhat.com
Tue Dec 22 11:00:02 UTC 2015


Vinzenz Feenstra has posted comments on this change.

Change subject: virt: Handle fork() related issues in vmchannels/guestagent
......................................................................


Patch Set 13:

(2 comments)

https://gerrit.ovirt.org/#/c/42570/13/vdsm/virt/vmchannels.py
File vdsm/virt/vmchannels.py:

Line 61:         if (event & (select.EPOLLHUP | select.EPOLLERR)):
Line 62:             self.log.debug("Received %.08X on fileno %d", event, fileno)
Line 63:             if fileno in self._channels:
Line 64:                 reconnect = True
Line 65:             self._epoll_remove(fileno)
> Is it possible to get an event about a fileno which is not in self._channel
Since we figured out that file handles can leak, and then you get an event from poll even though it's not tracked by this process anymore - Yes you can get one which is not in self._channels. I can't close that handle, since it is not mine.

If it is in channels we reconnect which will close the channel
Line 66:         elif (event & select.EPOLLIN):
Line 67:             obj = self._channels.get(fileno, None)
Line 68:             if obj:
Line 69:                 obj['timeout_seen'] = False


Line 123:         for fileno in self._del_channels:
Line 124:             self._add_channels.pop(fileno, None)
Line 125:             self._unconnected.pop(fileno, None)
Line 126:             self._channels.pop(fileno, None)
Line 127:             self._epoll_remove(fileno)
> Who is closing the socket?
If we're here, stop has been called and close should have been called from the outside
Line 128:             self.log.debug("fileno %d was removed from listener.", fileno)
Line 129:         self._del_channels = []
Line 130: 
Line 131:     def _update_channels(self):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic4a452f7837267434bc836fced4c2efd92d745cf
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Gal Hammer <ghammer%redhat.com at gtempaccount.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list