<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src, branch release-1.11.7</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>HTTP/2: prevented creating temp files for requests without body.</title>
<updated>2016-12-10T10:23:38+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-12-10T10:23:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=27c7ed683bc28e537f39d7717cce4ec111068dca'/>
<id>27c7ed683bc28e537f39d7717cce4ec111068dca</id>
<content type='text'>
The problem was introduced by 52bd8cc17f34.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem was introduced by 52bd8cc17f34.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: fixed posted streams handling.</title>
<updated>2016-11-28T17:58:14+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-11-28T17:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=5d496d467d35abd4014f825de3c572eaa4011a24'/>
<id>5d496d467d35abd4014f825de3c572eaa4011a24</id>
<content type='text'>
A bug was introduced by 82efcedb310b that could lead to timing out of
responses or segmentation fault, when accept_mutex was enabled.

The output queue in HTTP/2 can contain frames from different streams.
When the queue is sent, all related write handlers need to be called.
In order to do so, the streams were added to the h2c-&gt;posted queue
after handling sent frames.  Then this queue was processed in
ngx_http_v2_write_handler().

If accept_mutex is enabled, the event's "ready" flag is set but its
handler is not called immediately.  Instead, the event is added to
the ngx_posted_events queue.  At the same time in this queue can be
events from upstream connections.  Such events can result in sending
output queue before ngx_http_v2_write_handler() is triggered.  And
at the time ngx_http_v2_write_handler() is called, the output queue
can be already empty with some streams added to h2c-&gt;posted.

But after 82efcedb310b, these streams weren't processed if all frames
have already been sent and the output queue was empty.  This might lead
to a situation when a number of streams were get stuck in h2c-&gt;posted
queue for a long time.  Eventually these streams might get closed by
the send timeout.

In the worst case this might also lead to a segmentation fault, if
already freed stream was left in the h2c-&gt;posted queue.  This could
happen if one of the streams was terminated but wasn't closed, due to
the HEADERS frame or a partially sent DATA frame left in the output
queue.  If this happened the ngx_http_v2_filter_cleanup() handler
removed the stream from the h2c-&gt;waiting or h2c-&gt;posted queue on
termination stage, before the frame has been sent, and the stream
was again added to the h2c-&gt;posted queue after the frame was sent.

In order to fix all these problems and simplify the code, write
events of fake stream connections are now added to ngx_posted_events
instead of using a custom h2c-&gt;posted queue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A bug was introduced by 82efcedb310b that could lead to timing out of
responses or segmentation fault, when accept_mutex was enabled.

The output queue in HTTP/2 can contain frames from different streams.
When the queue is sent, all related write handlers need to be called.
In order to do so, the streams were added to the h2c-&gt;posted queue
after handling sent frames.  Then this queue was processed in
ngx_http_v2_write_handler().

If accept_mutex is enabled, the event's "ready" flag is set but its
handler is not called immediately.  Instead, the event is added to
the ngx_posted_events queue.  At the same time in this queue can be
events from upstream connections.  Such events can result in sending
output queue before ngx_http_v2_write_handler() is triggered.  And
at the time ngx_http_v2_write_handler() is called, the output queue
can be already empty with some streams added to h2c-&gt;posted.

But after 82efcedb310b, these streams weren't processed if all frames
have already been sent and the output queue was empty.  This might lead
to a situation when a number of streams were get stuck in h2c-&gt;posted
queue for a long time.  Eventually these streams might get closed by
the send timeout.

In the worst case this might also lead to a segmentation fault, if
already freed stream was left in the h2c-&gt;posted queue.  This could
happen if one of the streams was terminated but wasn't closed, due to
the HEADERS frame or a partially sent DATA frame left in the output
queue.  If this happened the ngx_http_v2_filter_cleanup() handler
removed the stream from the h2c-&gt;waiting or h2c-&gt;posted queue on
termination stage, before the frame has been sent, and the stream
was again added to the h2c-&gt;posted queue after the frame was sent.

In order to fix all these problems and simplify the code, write
events of fake stream connections are now added to ngx_posted_events
instead of using a custom h2c-&gt;posted queue.
</pre>
</div>
</content>
</entry>
<entry>
<title>Map: the "volatile" parameter.</title>
<updated>2016-12-08T14:51:49+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-08T14:51:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=72ace363184d4768627c2fd2b0a5236887cdc036'/>
<id>72ace363184d4768627c2fd2b0a5236887cdc036</id>
<content type='text'>
By default, "map" creates cacheable variables [1].  With this
parameter it creates a non-cacheable variable.

An original idea was to deduce the cacheability of the "map"
variable by checking the cacheability of variables specified
in source and resulting values, but it turned to be too hard.
For example, a cacheable variable can be overridden with the
"set" directive or with the SSI "set" command.  Also, keeping
"map" variables cacheable by default is good for performance
reasons.  This required adding a new parameter.

[1] Before db699978a33f (1.11.0), the cacheability of the
"map" variable could vary depending on the cacheability of
variables specified in resulting values (ticket #1090).
This is believed to be a bug rather than a feature.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By default, "map" creates cacheable variables [1].  With this
parameter it creates a non-cacheable variable.

An original idea was to deduce the cacheability of the "map"
variable by checking the cacheability of variables specified
in source and resulting values, but it turned to be too hard.
For example, a cacheable variable can be overridden with the
"set" directive or with the SSI "set" command.  Also, keeping
"map" variables cacheable by default is good for performance
reasons.  This required adding a new parameter.

[1] Before db699978a33f (1.11.0), the cacheability of the
"map" variable could vary depending on the cacheability of
variables specified in resulting values (ticket #1090).
This is believed to be a bug rather than a feature.
</pre>
</div>
</content>
</entry>
<entry>
<title>Map: simplified "map" block parser.</title>
<updated>2016-12-08T14:29:01+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-08T14:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=41f06845cf5373d6a86e383f946006fd4ee87137'/>
<id>41f06845cf5373d6a86e383f946006fd4ee87137</id>
<content type='text'>
No functional changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Slab: commented bitmap initialization for small allocations.</title>
<updated>2016-12-08T14:22:07+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-08T14:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=7ef8ca24b563d89f4bbc7b9b6f24211bbbbfbc41'/>
<id>7ef8ca24b563d89f4bbc7b9b6f24211bbbbfbc41</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Slab: free pages statistics.</title>
<updated>2016-12-07T19:25:37+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-07T19:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=5abd39a19734e22a4044af03ede4fdb4b0285d9c'/>
<id>5abd39a19734e22a4044af03ede4fdb4b0285d9c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Slab: slots statistics.</title>
<updated>2016-12-07T19:25:37+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-07T19:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=9ccf719be6b922715fc6bdfabf24742eeec46ba4'/>
<id>9ccf719be6b922715fc6bdfabf24742eeec46ba4</id>
<content type='text'>
For each slot, the number of total and used entries, as well as
the number of allocation requests and failures, are tracked.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For each slot, the number of total and used entries, as well as
the number of allocation requests and failures, are tracked.
</pre>
</div>
</content>
</entry>
<entry>
<title>Slab: simplified some math.</title>
<updated>2016-12-07T19:25:37+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-07T19:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=366f131c382d877bca19545af258e221d59bfd66'/>
<id>366f131c382d877bca19545af258e221d59bfd66</id>
<content type='text'>
No functional changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Slab: simplified allocation from slots.</title>
<updated>2016-12-07T19:25:37+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-07T19:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=12abb66c4138a9be7463db6aad497844d55aba43'/>
<id>12abb66c4138a9be7463db6aad497844d55aba43</id>
<content type='text'>
Removed code that would cause an endless loop, and removed condition
check that is always false.  The first page in the slot list is
guaranteed to satisfy an allocation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed code that would cause an endless loop, and removed condition
check that is always false.  The first page in the slot list is
guaranteed to satisfy an allocation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Slab: fixed the number of pages calculation.</title>
<updated>2016-12-07T19:25:37+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-12-07T19:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=16de9fc3b52e82d1e2be740be4a1ee9adafb6fbf'/>
<id>16de9fc3b52e82d1e2be740be4a1ee9adafb6fbf</id>
<content type='text'>
When estimating the number of pages, do not count memory for slots.
In some cases this gives one extra usable memory page.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When estimating the number of pages, do not count memory for slots.
In some cases this gives one extra usable memory page.
</pre>
</div>
</content>
</entry>
</feed>
