Nir Soffer has uploaded a new change for review. Change subject: betterAsyncore: Fix event loop data stealing [1/2] ......................................................................
betterAsyncore: Fix event loop data stealing [1/2] When a dispatcher is removed from the event loop from a handle_read() handler, and the underlying socket has pending data, the event loop could steal data from the socket, invoking handle_read() multiple times. In this patch we add little sleep before handling the request in the protocol detectors, revealing this issue in the protocolDetector tests. Change-Id: Icf01f9a45ecf1e7d0ed14844f8203d7df32d2dcb Signed-off-by: Nir Soffer <[email protected]> --- M tests/protocoldetectorTests.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/39513/1 diff --git a/tests/protocoldetectorTests.py b/tests/protocoldetectorTests.py index 8ef1582..297537d 100644 --- a/tests/protocoldetectorTests.py +++ b/tests/protocoldetectorTests.py @@ -49,6 +49,9 @@ dispatcher.del_channel() def run(): + # Wait to detect case where the event loop steals data from + # the socket after the dispatcher was removed. + time.sleep(0.05) try: request = "" while "\n" not in request: -- To view, visit https://gerrit.ovirt.org/39513 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf01f9a45ecf1e7d0ed14844f8203d7df32d2dcb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
