[New-bugs-announce] [issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever

Vincent Michel report at bugs.python.org
Thu Oct 25 08:32:26 EDT 2018


New submission from Vincent Michel <vxgmichel at gmail.com>:

I'm not sure whether it is intended or not, but I noticed a change in the  behavior of `StreamReader` between version 3.7 and 3.8.

Basically, reading some received data from a closed TCP stream using `StreamReader.read` might hang forever, under certain conditions.

I'm not sure what those conditions are but I managed to reproduce the issue consistently with the following workflow:
 - server writes some data
 - client reads a part of the data
 - client closes the writer
 - server closes the writer
 - client tries to read the remaining data

The test attached implements the behavior. It fails on 3.8 but passes on 3.7

----------
components: asyncio
files: stuck_on_py38.py
messages: 328430
nosy: asvetlov, vxgmichel, yselivanov
priority: normal
severity: normal
status: open
title: Reading received data from a closed TCP stream using `StreamReader.read` might hang forever
versions: Python 3.8
Added file: https://bugs.python.org/file47891/stuck_on_py38.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35065>
_______________________________________


More information about the New-bugs-announce mailing list