[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-26 Thread STINNER Victor
STINNER Victor added the comment: I fixed many other issues related to the IocpProactor. This time it should be ok. I ran the Tulip and Trollius test suite a lot of times, in release and debug mode. I didn't see any warning nor hang. I also ran test_asyncio of Python as well. I close this iss

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 36e80c6599aa by Victor Stinner in branch '3.4': Issue #23095, asyncio: Fix _WaitHandleFuture.cancel() https://hg.python.org/cpython/rev/36e80c6599aa -- ___ Python tracker

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-26 Thread STINNER Victor
STINNER Victor added the comment: Pseudo-code: --- handle = ... fut = proactor.wait_for_handle(handle) fut.cancel() loop.close() --- Windows functions called in this code: - A: call RegisterWaitForSingleObject() on an handle - A: call UnregisterWaitEx() with an event - B: call RegisterWaitForSi

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-22 Thread STINNER Victor
STINNER Victor added the comment: Running "runtests.py test_cancel_post_init test_shell" and "runtests.py test_wait_for_handle test_wait_for_handle_cancel" of Tulip show a different behaviour of _WaitHandleFuture. In one case, the cancelled wait is still signaled, on other case, it's never sig

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-22 Thread STINNER Victor
STINNER Victor added the comment: A different hang on "AMD64 Windows7 SP1 3.4/" buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.4/builds/805/steps/test/logs/stdio This build is also related to the changeset d3804307cce44f7f02e38166daf6d8227aa45021: "IocpProactor.cl

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-22 Thread STINNER Victor
STINNER Victor added the comment: test_asyncio hangs on "AMD64 Windows7 SP1 3.x" buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5562 The most significant change of this build is the changeset d3804307cce4: "IocpProactor.close() must not cancel pending _Wai

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-21 Thread STINNER Victor
STINNER Victor added the comment: "IocpProactor.close() must not cancel pending _WaitCancelFuture futures" FYI I found this bug when running the trollius test suite. -- ___ Python tracker _

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset d3804307cce4 by Victor Stinner in branch '3.4': Issue #23095, asyncio: IocpProactor.close() must not cancel pending https://hg.python.org/cpython/rev/d3804307cce4 -- ___ Python tracker

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Congrats with the fix, and thanks for your perseverance! -- ___ Python tracker ___ ___ Python-bugs

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-21 Thread STINNER Victor
STINNER Victor added the comment: It took me several months to understand this issue. For the beginning of the story, see: https://code.google.com/p/tulip/issues/detail?id=196 But I think that *this* issue can be closed: UnregisterWaitEx() really do what we need in asyncio. I don't like the c

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb8a093db8b1 by Victor Stinner in branch '3.4': Issue #23095, asyncio: Rewrite _WaitHandleFuture.cancel() https://hg.python.org/cpython/rev/fb8a093db8b1 -- nosy: +python-dev ___ Python tracker

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-21 Thread STINNER Victor
STINNER Victor added the comment: To wait for the exit of the subprocess, we use RegisterWaitForSingleObject(). To cancel this wait, we can use UnregisterWait() which returns immediatly. Problem: UnregisterWait() doesn't tell us if the wait was cancelled or not, the cancellation is asynchronou

[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

2015-01-20 Thread STINNER Victor
Changes by STINNER Victor : -- title: asyncio: race condition when cancelling a _WaitHandleFuture -> [Windows] asyncio: race condition when cancelling a _WaitHandleFuture ___ Python tracker ___