Dan Kenigsberg has submitted this change and it was merged. Change subject: misc: Fix possible deadlock when entering sampling method ......................................................................
misc: Fix possible deadlock when entering sampling method If a thread entered a sampling method and got the lock, it must exit and release the lock. This code try to ensure this using try finally block. However, before the try, we log a message about entering the sampling method. If this log call raises, the lock will never be released, causing all other threads entering this methods to wait forever. The possibility of logging failure is very low, but we have seen this in the field with older Python versions. It is likely that most of the code is not safe considering such errors, but this particular case it is trivial to write the code safely. Change-Id: Ie4b5ce467ed07a3ba787687c7caa9db4c765ef08 Signed-off-by: Nir Soffer <[email protected]> Reviewed-on: http://gerrit.ovirt.org/28612 Reviewed-by: Federico Simoncelli <[email protected]> Reviewed-by: Yaniv Bronhaim <[email protected]> Reviewed-by: Saggi Mizrahi <[email protected]> --- M vdsm/storage/misc.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nir Soffer: Verified Yaniv Bronhaim: Looks good to me, but someone else must approve Saggi Mizrahi: Looks good to me, approved Federico Simoncelli: Looks good to me, but someone else must approve -- To view, visit http://gerrit.ovirt.org/28612 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4b5ce467ed07a3ba787687c7caa9db4c765ef08 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
