This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [Windows] asyncio: race condition related to IocpProactor.connect_pipe()
Type: Stage:
Components: asyncio, Windows Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, python-dev, steve.dower, tim.golden, vstinner, yselivanov, zach.ware
Priority: normal Keywords:

Created on 2015-01-21 22:32 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg234448 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-01-21 22:32
Currently, IocpProactor.connect_pipe() is implemented with QueueUserWorkItem() which starts a thread that cannot be interrupted. Because of that, this function requires special cases in _register() and close() methods of IocpProactor.

While fixing the issue #23095, I saw that IocpProactor.connect_pipe() causes "GetQueuedCompletionStatus() returned an unexpected event" messages to be logged, but also to hang the test suite.

I propose a solution to reimplement IocpProactor.connect_pipe() without a thread:
https://code.google.com/p/tulip/issues/detail?id=197

It should fix this issue.
msg234515 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-01-22 22:03
New changeset 1e3a1af0705f by Victor Stinner in branch '3.4':
Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe()
https://hg.python.org/cpython/rev/1e3a1af0705f
msg234517 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-01-22 22:05
Issue fixed: IocpProactor.connect_pipe() doesn't use "blocking" operations anymore, it's now implemented as polling with non blocking operations.
msg234727 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-01-26 10:07
New changeset b6ab8fe16d16 by Victor Stinner in branch '3.4':
Issue #23293, asyncio: Cleanup IocpProactor.close()
https://hg.python.org/cpython/rev/b6ab8fe16d16
msg234744 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-01-26 14:05
New changeset 99c3e304a4ea by Victor Stinner in branch '3.4':
Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe() as a coroutine
https://hg.python.org/cpython/rev/99c3e304a4ea
History
Date User Action Args
2022-04-11 14:58:12adminsetgithub: 67482
2015-01-26 14:05:24python-devsetmessages: + msg234744
2015-01-26 10:07:33python-devsetmessages: + msg234727
2015-01-22 22:05:44vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg234517
2015-01-22 22:03:59python-devsetnosy: + python-dev
messages: + msg234515
2015-01-21 23:41:08vstinnersettitle: [Windows] asyncio: race condition related in IocpProactor.connect_pipe() -> [Windows] asyncio: race condition related to IocpProactor.connect_pipe()
2015-01-21 22:32:53vstinnercreate