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: Deadlock in asyncio.StreamReader.readexactly() (fix applied, need unit test)
Type: behavior Stage: test needed
Components: asyncio Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, python-dev, vstinner, yselivanov
Priority: high Keywords:

Created on 2014-01-07 00:07 by gvanrossum, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg207494 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2014-01-07 00:07
There's currently a deadlock in StreamReader.readexactly() -- if the requested size is larger than the buffer limit for pause, the transport may be paused with no way to unpause it.

See http://code.google.com/p/tulip/issues/detail?id=99 in the Tulip tracker.
msg207495 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-01-07 00:09
New changeset 54d32e01bbfd by Guido van Rossum in branch 'default':
asyncio: Fix deadlock in readexactly(). Fixes issue #20154.
http://hg.python.org/cpython/rev/54d32e01bbfd
msg207496 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2014-01-07 00:15
I'd appreciate help writing a test.  (Debugging this already set me back enough hours.)
msg210395 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-02-06 14:51
> I'd appreciate help writing a test.  (Debugging this already set me back enough hours.)

Guido: do you still plan to write such unit test or can we close the issue?
msg210408 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2014-02-06 16:26
I'd still like there to be a test.
On Feb 6, 2014 6:52 AM, "STINNER Victor" <report@bugs.python.org> wrote:

>
> STINNER Victor added the comment:
>
> > I'd appreciate help writing a test.  (Debugging this already set me back
> enough hours.)
>
> Guido: do you still plan to write such unit test or can we close the issue?
>
> ----------
> nosy: +haypo
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue20154>
> _______________________________________
>
msg246379 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-07-06 19:53
I don't see anyone motivated to write a complex unit test for the issue which is already fixed, so I close the issue. Thanks for the fix Guido.
History
Date User Action Args
2022-04-11 14:57:56adminsetgithub: 64353
2015-07-06 19:53:41vstinnersetstatus: open -> closed
resolution: remind -> fixed
messages: + msg246379
2014-06-06 11:40:43vstinnersetnosy: + yselivanov
components: + asyncio
2014-03-13 09:55:46vstinnersettitle: Deadlock in asyncio.StreamReader.readexactly() -> Deadlock in asyncio.StreamReader.readexactly() (fix applied, need unit test)
2014-02-06 16:26:07gvanrossumsetmessages: + msg210408
2014-02-06 14:51:49vstinnersetnosy: + vstinner
messages: + msg210395
2014-01-07 00:15:52gvanrossumsetresolution: remind
messages: + msg207496
2014-01-07 00:09:29python-devsetnosy: + python-dev
messages: + msg207495
2014-01-07 00:07:48gvanrossumcreate