Change in vdsm[ovirt-3.5]: resourceManager: Fix ResourceRef leak
fromani at redhat.com
fromani at redhat.com
Mon Jan 25 10:45:19 UTC 2016
Francesco Romani has submitted this change and it was merged.
Change subject: resourceManager: Fix ResourceRef leak
......................................................................
resourceManager: Fix ResourceRef leak
Each time we create a disk, we leak 6 objects; one ResourceRef and
several pthreading Locks and Conditions:
Thread-13::WARNING::2016-01-15 20:29:43,126::health::102::health::
(_check_garbage) Found 6 uncollectable objects: [
"< ResourceRef '869b6036-a9ca-43eb-9287-828803822783_imageNS.
489402de-1850-4dfd-b71a-193b92f402e1', isValid: 'False'
obj: 'None'>",
'<pthreading.Lock object at 0x7f6ecc04a5a8>',
'<pthreading.Lock object at 0x7f6ee4028368>',
'<pthread.Cond object at 0x7f6f040fcf10>',
'<pthread.Cond object at 0x7f6f040fcb50>',
'<pthread.Cond object at 0x7f6f040fce10>']
ResourceRef is adding some of its wrapped object methods to itself,
creating a reference cycle. Because it also implements __del__, this
wrapping make it uncollectable. Use weakref.proxy to avoid the
reference cycle, fixing this leak.
Change-Id: I890616ba53ee70688ee00ea337ebc566d63f861d
Bug-Url: https://bugzilla.redhat.com/1269424
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/51917
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Adam Litke <alitke at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/52563
Continuous-Integration: Jenkins CI
Reviewed-by: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Tested-by: Francesco Romani <fromani at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/52629
---
M vdsm/storage/resourceManager.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Piotr Kliczewski: Looks good to me, but someone else must approve
Nir Soffer: Looks good to me, but someone else must approve; Passed CI tests
Francesco Romani: Verified; Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/52629
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I890616ba53ee70688ee00ea337ebc566d63f861d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the vdsm-patches
mailing list