Roundup Robot added the comment:
New changeset d7e4efd5e279 by Victor Stinner in branch '3.4':
Closes #21886, #21447: Fix a race condition in asyncio when setting the result
http://hg.python.org/cpython/rev/d7e4efd5e279
New changeset 50c995bdc00a by Victor Stinner in branch 'default':
(Merge
STINNER Victor added the comment:
This issue contains two sub-issues:
- race condition in_write_to_self() = already fixed
- race condition with scheduled call to future.set_result(), InvalidStateError
= I just opened the issue #21886 to discuss it
@Ryder: If you are able to reproduce the
STINNER Victor added the comment:
I'm unable to reproduce the issue with Python 3.5 (development version).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21447
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
components: +Asyncio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21447
___
___
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21447
___
___
New submission from Ryder Lewis:
Intermittently, when using asyncio.wait_for() with asyncio.open_connection() to
cancel the open_connection() task after a timeout period, an
asyncio.futures.InvalidStateError is raised. It seems to be a race condition,
if the open_connection() call succeeds
Ryder Lewis added the comment:
Another run raised a different exception,
again running ./example.py http://www.yahoo.com/
Timed out with 0.05-second timeout
HTTP header HTTP/1.0 301 Redirect
HTTP header Date: Tue, 06 May 2014 18:58:53 GMT
HTTP header Connection: close
HTTP header Via: http/1.1
Changes by Ned Deily n...@acm.org:
--
nosy: +giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21447
___
Guido van Rossum added the comment:
The second error is easy to explain and fix: it's a race condition between the
OS thread used to call getaddrinfo() and the main thread. The method
_write_to_self() in selector_events.py is hopelessly naive. It should probably
become something like this:
Roundup Robot added the comment:
New changeset afe8c4bd3230 by Guido van Rossum in branch '3.4':
asyncio: Fix the second half of issue #21447: race in _write_to_self().
http://hg.python.org/cpython/rev/afe8c4bd3230
New changeset c0538334f4df by Guido van Rossum in branch 'default':
Merge
Guido van Rossum added the comment:
I'm a little closer to understanding the first (more common) traceback. I can
repro it by running your demo program in a loop -- it may take a while but
occasionally I do get the same InvalidStateError.
This appears to be an example of the problem
11 matches
Mail list logo