[Python-modules-team] Bug#949974: More details

Enrico Zini enrico at enricozini.org
Wed Apr 29 17:53:50 BST 2020


On Mon, Jan 27, 2020 at 09:46:35PM +0100, Enrico Zini wrote:

> If there is still data to write, self._pending_write is not done when
> future_add_done_callback is called, and RequestHandler.flush() won't get
> stuck.

Keeping the write buffer nonempty is not sufficient: if it remains with
a few data, the problem is triggered anyway, as it will managed to get
written right away and set the _pending_write future to done() before
reaching the event loop, triggering the hang again.

Since this depends on whether there is enough pending data to write to
cause the buffer to block, it's hard to predict what is a reasonable
amount of data to leave in the pipeline as a workaround.

Meaning, I currently cannot find a way to await finish() in tornado 5.

It would be important for me to do so, as it's the only way I have to be
able to log an outcome of a request, figuring out for example if the
remote has closed the connection early.

 - - -

To answer Julien Puydt, this is fixed upstream in Tornado 6, which is
not in Debian yet.

I would call this by now a debian-specific bug, and I think it's useful
to document it here, rather than waste upstream's time with an issue
they have fixed in a version releases a year ago.


Enrico

-- 
GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini <enrico at enricozini.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20200429/e602d6b5/attachment.sig>


More information about the Python-modules-team mailing list