<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/event, branch release-1.10.3</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Upstream: fixed cache corruption and socket leaks with aio_write.</title>
<updated>2017-01-20T18:14:19+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2017-01-20T18:14:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=be7975abe328856a80e5041151265fef259b3547'/>
<id>be7975abe328856a80e5041151265fef259b3547</id>
<content type='text'>
The ngx_event_pipe() function wasn't called on write events with
wev-&gt;delayed set.  As a result, threaded writing results weren't
properly collected in ngx_event_pipe_write_to_downstream() when a
write event was triggered for a completed write.

Further, this wasn't detected, as p-&gt;aio was reset by a thread completion
handler, and results were later collected in ngx_event_pipe_read_upstream()
instead of scheduling a new write of additional data.  If this happened
on the last reading from an upstream, last part of the response was never
written to the cache file.

Similar problems might also happen in case of timeouts when writing to
client, as this also results in ngx_event_pipe() not being called on write
events.  In this scenario socket leaks were observed.

Fix is to check if p-&gt;writing is set in ngx_event_pipe_read_upstream(), and
therefore collect results of previous write operations in case of read events
as well, similar to how we do so in ngx_event_pipe_write_downstream().
This is enough to fix the wev-&gt;delayed case.  Additionally, we now call
ngx_event_pipe() from ngx_http_upstream_process_request() if there are
uncollected write operations (p-&gt;writing and !p-&gt;aio).  This also fixes
the wev-&gt;timedout case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ngx_event_pipe() function wasn't called on write events with
wev-&gt;delayed set.  As a result, threaded writing results weren't
properly collected in ngx_event_pipe_write_to_downstream() when a
write event was triggered for a completed write.

Further, this wasn't detected, as p-&gt;aio was reset by a thread completion
handler, and results were later collected in ngx_event_pipe_read_upstream()
instead of scheduling a new write of additional data.  If this happened
on the last reading from an upstream, last part of the response was never
written to the cache file.

Similar problems might also happen in case of timeouts when writing to
client, as this also results in ngx_event_pipe() not being called on write
events.  In this scenario socket leaks were observed.

Fix is to check if p-&gt;writing is set in ngx_event_pipe_read_upstream(), and
therefore collect results of previous write operations in case of read events
as well, similar to how we do so in ngx_event_pipe_write_downstream().
This is enough to fix the wev-&gt;delayed case.  Additionally, we now call
ngx_event_pipe() from ngx_http_upstream_process_request() if there are
uncollected write operations (p-&gt;writing and !p-&gt;aio).  This also fixes
the wev-&gt;timedout case.
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: default DH parameters compatible with OpenSSL 1.1.0.</title>
<updated>2016-10-18T14:25:38+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2016-10-18T14:25:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=789abf2b8cfd184555a09f7001b59e82c003c43c'/>
<id>789abf2b8cfd184555a09f7001b59e82c003c43c</id>
<content type='text'>
This is a direct commit to stable as there is no corresponding code
in mainline, default DH parameters were removed in 1aa9650a8154.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a direct commit to stable as there is no corresponding code
in mainline, default DH parameters were removed in 1aa9650a8154.
</pre>
</div>
</content>
</entry>
<entry>
<title>Event pipe: do not set file's thread_handler if not needed.</title>
<updated>2016-09-01T17:05:23+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2016-09-01T17:05:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=09453e10d03571ecb32fe8bc77d4bcc7e10fcf3a'/>
<id>09453e10d03571ecb32fe8bc77d4bcc7e10fcf3a</id>
<content type='text'>
This fixes a problem with aio threads and sendfile with aio_write switched
off, as observed with range requests after fc72784b1f52 (1.9.13).  Potential
problems with sendfile in threads were previously described in 9fd738b85fad,
and this seems to be one of them.

The problem occurred as file's thread_handler was set to NULL by event pipe
code after a sendfile thread task was scheduled.  As a result, no sendfile
completion code was executed, and the same buffer was additionally sent
using non-threaded sendfile.  Fix is to avoid modifying file's thread_handler
if aio_write is switched off.

Note that with "aio_write on" it is still possible that sendfile will use
thread_handler as set by event pipe.  This is believed to be safe though,
as handlers used are compatible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a problem with aio threads and sendfile with aio_write switched
off, as observed with range requests after fc72784b1f52 (1.9.13).  Potential
problems with sendfile in threads were previously described in 9fd738b85fad,
and this seems to be one of them.

The problem occurred as file's thread_handler was set to NULL by event pipe
code after a sendfile thread task was scheduled.  As a result, no sendfile
completion code was executed, and the same buffer was additionally sent
using non-threaded sendfile.  Fix is to avoid modifying file's thread_handler
if aio_write is switched off.

Note that with "aio_write on" it is still possible that sendfile will use
thread_handler as set by event pipe.  This is believed to be safe though,
as handlers used are compatible.
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: adopted session ticket handling for OpenSSL 1.1.0.</title>
<updated>2016-08-22T15:53:21+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2016-08-22T15:53:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=63260a6842e1b9c4dbe28c669ff2c74a63f8df5c'/>
<id>63260a6842e1b9c4dbe28c669ff2c74a63f8df5c</id>
<content type='text'>
Return 1 in the SSL_CTX_set_tlsext_ticket_key_cb() callback function
to indicate that a new session ticket is created, as per documentation.
Until 1.1.0, OpenSSL didn't make a distinction between non-negative
return values.

See https://git.openssl.org/?p=openssl.git;a=commitdiff;h=5c753de for details.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return 1 in the SSL_CTX_set_tlsext_ticket_key_cb() callback function
to indicate that a new session ticket is created, as per documentation.
Until 1.1.0, OpenSSL didn't make a distinction between non-negative
return values.

See https://git.openssl.org/?p=openssl.git;a=commitdiff;h=5c753de for details.
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: guarded SSL_R_NO_CIPHERS_PASSED not present in OpenSSL 1.1.0.</title>
<updated>2016-08-08T10:44:49+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2016-08-08T10:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f3dfbb5d1fd00659e886a1cdb56cc07a68340e6d'/>
<id>f3dfbb5d1fd00659e886a1cdb56cc07a68340e6d</id>
<content type='text'>
It was removed in OpenSSL 1.1.0 Beta 3 (pre-release 6).  It was
not used since OpenSSL 1.0.1n and 1.0.2b.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was removed in OpenSSL 1.1.0 Beta 3 (pre-release 6).  It was
not used since OpenSSL 1.0.1n and 1.0.2b.
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed redundant "u" format specifier.</title>
<updated>2016-04-08T12:03:38+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-04-08T12:03:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=37a3a2b2e8ef3202045e4095d894f806ed5e7654'/>
<id>37a3a2b2e8ef3202045e4095d894f806ed5e7654</id>
<content type='text'>
It is implied for "x" and "X".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is implied for "x" and "X".
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed spelling.</title>
<updated>2016-04-07T08:50:13+00:00</updated>
<author>
<name>Josh Soref</name>
<email>timeless@gmail.com</email>
</author>
<published>2016-04-07T08:50:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=73d27510c0d7022384a611269af22ff01634c6d0'/>
<id>73d27510c0d7022384a611269af22ff01634c6d0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: SSLeay_version() is deprecated in OpenSSL 1.1.0.</title>
<updated>2016-03-31T20:38:38+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2016-03-31T20:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=2e251b1c342370b8b3365cf30eca2cf61d9ef559'/>
<id>2e251b1c342370b8b3365cf30eca2cf61d9ef559</id>
<content type='text'>
SSLeay_version() and SSLeay() are no longer available if OPENSSL_API_COMPAT
is set to 0x10100000L.  Switched to using OpenSSL_version() instead.

Additionally, we now compare version strings instead of version numbers,
and this correctly works for LibreSSL as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SSLeay_version() and SSLeay() are no longer available if OPENSSL_API_COMPAT
is set to 0x10100000L.  Switched to using OpenSSL_version() instead.

Additionally, we now compare version strings instead of version numbers,
and this correctly works for LibreSSL as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: X509 was made opaque in OpenSSL 1.1.0.</title>
<updated>2016-03-31T20:38:37+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2016-03-31T20:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=d8fbce1deb24a174f327786684f862cc39b5ac0a'/>
<id>d8fbce1deb24a174f327786684f862cc39b5ac0a</id>
<content type='text'>
To increment reference counters we now use newly introduced X509_up_ref()
function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To increment reference counters we now use newly introduced X509_up_ref()
function.
</pre>
</div>
</content>
</entry>
<entry>
<title>SSL: EVP_MD_CTX was made opaque in OpenSSL 1.1.0.</title>
<updated>2016-03-31T20:38:36+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2016-03-31T20:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=66feb8c6f01a682e93f11e2c80c59bf425d70af9'/>
<id>66feb8c6f01a682e93f11e2c80c59bf425d70af9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
