nginx-quic/src
Maxim Dounin bede588761 Changed ngx_chain_update_chains() to test tag first (ticket #2248).
Without this change, aio used with HTTP/2 can result in connection hang,
as observed with "aio threads; aio_write on;" and proxying (ticket #2248).

The problem is that HTTP/2 updates buffers outside of the output filters
(notably, marks them as sent), and then posts a write event to call
output filters.  If a filter does not call the next one for some reason
(for example, because of an AIO operation in progress), this might
result in a state when the owner of a buffer already called
ngx_chain_update_chains() and can reuse the buffer, while the same buffer
is still sitting in the busy chain of some other filter.

In the particular case a buffer was sitting in output chain's ctx->busy,
and was reused by event pipe.  Output chain's ctx->busy was permanently
blocked by it, and this resulted in connection hang.

Fix is to change ngx_chain_update_chains() to skip buffers from other
modules unconditionally, without trying to wait for these buffers to
become empty.
2021-10-30 02:39:19 +03:00
..
core Changed ngx_chain_update_chains() to test tag first (ticket #2248). 2021-10-30 02:39:19 +03:00
event SSL: use of the SSL_OP_IGNORE_UNEXPECTED_EOF option. 2021-08-10 23:43:17 +03:00
http Fixed $content_length cacheability with chunked (ticket #2252). 2021-10-06 18:01:42 +03:00
mail Mail: fixed build without SSL. 2021-03-11 04:46:26 +03:00
misc Cpp test: added stream. 2020-10-13 07:44:09 +03:00
os Removed "ch" argument from ngx_pass_open_channel(). 2021-03-11 09:58:45 +03:00
stream SSL: fixed build by Sun C with old OpenSSL versions. 2021-03-05 17:16:13 +03:00