Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.7] bpo-33694: Fix race condition in asyncio proactor (GH-7498) #7499

Merged
merged 1 commit into from
Jun 7, 2018

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 7, 2018

The cancellation of an overlapped WSARecv() has a race condition
which causes data loss because of the current implementation of
proactor in asyncio.

No longer cancel overlapped WSARecv() in _ProactorReadPipeTransport
to work around the race condition.

Remove the optimized recv_into() implementation to get simple
implementation of pause_reading() using the single _pending_data
attribute.

Move _feed_data_to_bufferred_proto() to protocols.py.

Remove set_protocol() method which became useless.
(cherry picked from commit 79790bc)

Co-authored-by: Victor Stinner vstinner@redhat.com

https://bugs.python.org/issue33694

The cancellation of an overlapped WSARecv() has a race condition
which causes data loss because of the current implementation of
proactor in asyncio.

No longer cancel overlapped WSARecv() in _ProactorReadPipeTransport
to work around the race condition.

Remove the optimized recv_into() implementation to get simple
implementation of pause_reading() using the single _pending_data
attribute.

Move _feed_data_to_bufferred_proto() to protocols.py.

Remove set_protocol() method which became useless.
(cherry picked from commit 79790bc)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
@miss-islington
Copy link
Contributor Author

@vstinner: Backport status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@vstinner: Backport status check is done, and it's a success ✅ .

@vstinner vstinner merged commit 8fa398d into python:3.7 Jun 7, 2018
@miss-islington
Copy link
Contributor Author

Thanks, @vstinner!

@miss-islington miss-islington deleted the backport-79790bc-3.7 branch June 7, 2018 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants