nginx/src
Maxim Dounin 00fcc6a987 Copy filter: fixed sendfile aio handlers to set ctx->aio.
Sendfile handlers (aio preload and thread handler) are called within
ctx->output_filter() in ngx_output_chain(), and hence ctx->aio cannot
be set directly in ngx_output_chain().  Meanwhile, it must be set to
make sure loop within ngx_output_chain() will be properly terminated.

There are no known cases that trigger the problem, though in theory
something like aio + sub filter (something that needs body in memory,
and can also free some memory buffers) + sendfile can result in
"task already active" and "second aio post" alerts.

The fix is to set ctx->aio in ngx_http_copy_aio_sendfile_preload()
and ngx_http_copy_thread_handler().

For consistency, ctx->aio is no longer set explicitly in
ngx_output_chain_copy_buf(), as it's now done in
ngx_http_copy_thread_handler().
2016-03-03 21:14:19 +03:00
..
core Copy filter: fixed sendfile aio handlers to set ctx->aio. 2016-03-03 21:14:19 +03:00
event SSL: avoid calling SSL_shutdown() during handshake (ticket #901). 2016-02-19 17:27:30 +03:00
http Copy filter: fixed sendfile aio handlers to set ctx->aio. 2016-03-03 21:14:19 +03:00
mail Dynamic modules: changed ngx_modules to cycle->modules. 2016-02-04 18:30:21 +03:00
misc Style: fix typo. 2014-07-08 03:03:14 -07:00
mysql Copyright updated. 2012-01-18 15:07:43 +00:00
os Fixed sendfile in threads (or with aio preload) and subrequests. 2016-03-03 21:14:12 +03:00
stream Stream: initialize variable right before using it. 2016-02-11 14:20:26 +03:00