Skip to content

gh-156698: Fix _ProactorDatagramTransport never resumes a paused protocol after a write error - #156718

Open
graingert wants to merge 3 commits into
python:mainfrom
graingert:fix-proactor-error-hang
Open

gh-156698: Fix _ProactorDatagramTransport never resumes a paused protocol after a write error#156718
graingert wants to merge 3 commits into
python:mainfrom
graingert:fix-proactor-error-hang

Conversation

@graingert

@graingert graingert commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@graingert graingert changed the title gh-156698: fix proactor error hang gh-156698: _ProactorDatagramTransport never resumes a paused protocol after a write error Aug 31, 2026
@graingert graingert changed the title gh-156698: _ProactorDatagramTransport never resumes a paused protocol after a write error gh-156698: Fix _ProactorDatagramTransport never resumes a paused protocol after a write error Aug 31, 2026
@graingert
graingert marked this pull request as ready for review August 31, 2026 15:18
@graingert
graingert force-pushed the fix-proactor-error-hang branch from a3b797a to 800498e Compare August 31, 2026 17:30
@graingert graingert added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Sep 1, 2026
Comment thread Lib/asyncio/proactor_events.py Outdated
if self._buffer and not self._conn_lost:
# Re-arm the write loop so buffered data isn't stranded and
# a paused protocol is eventually resumed (gh-156698).
self._loop.call_soon(self._loop_writing)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protocol.error_received could call send/sendto and we get a write_fut scheduled which will cause loop_writing's assertion to fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_ProactorDatagramTransport never resumes a paused protocol after a write error

1 participant