<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/os/unix, branch release-1.25.4</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>AIO operations now add timers (ticket #2162).</title>
<updated>2024-01-29T07:31:37+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2024-01-29T07:31:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=b794465178ecf48f13b37e4397145b05fd3fe6df'/>
<id>b794465178ecf48f13b37e4397145b05fd3fe6df</id>
<content type='text'>
Each AIO (thread IO) operation being run is now accompanied with 1-minute
timer.  This timer prevents unexpected shutdown of the worker process while
an AIO operation is running, and logs an alert if the operation is running
for too long.

This fixes "open socket left" alerts during worker processes shutdown
due to pending AIO (or thread IO) operations while corresponding requests
have no timers.  In particular, such errors were observed while reading
cache headers (ticket #2162), and with worker_shutdown_timeout.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each AIO (thread IO) operation being run is now accompanied with 1-minute
timer.  This timer prevents unexpected shutdown of the worker process while
an AIO operation is running, and logs an alert if the operation is running
for too long.

This fixes "open socket left" alerts during worker processes shutdown
due to pending AIO (or thread IO) operations while corresponding requests
have no timers.  In particular, such errors were observed while reading
cache headers (ticket #2162), and with worker_shutdown_timeout.
</pre>
</div>
</content>
</entry>
<entry>
<title>Silenced complaints about socket leaks on forced termination.</title>
<updated>2024-01-29T07:29:39+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2024-01-29T07:29:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=cc4c3ee0a45ca3a2eeac2874e9199bf42560015c'/>
<id>cc4c3ee0a45ca3a2eeac2874e9199bf42560015c</id>
<content type='text'>
When graceful shutdown was requested, and then nginx was forced to
do fast shutdown, it used to (incorrectly) complain about open sockets
left in connections which weren't yet closed when fast shutdown
was requested.

Fix is to avoid complaining about open sockets when fast shutdown was
requested after graceful one.  Abnormal termination, if requested with
the WINCH signal, can still happen though.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When graceful shutdown was requested, and then nginx was forced to
do fast shutdown, it used to (incorrectly) complain about open sockets
left in connections which weren't yet closed when fast shutdown
was requested.

Fix is to avoid complaining about open sockets when fast shutdown was
requested after graceful one.  Abnormal termination, if requested with
the WINCH signal, can still happen though.
</pre>
</div>
</content>
</entry>
<entry>
<title>QUIC: path MTU discovery.</title>
<updated>2023-08-14T05:21:27+00:00</updated>
<author>
<name>Roman Arutyunyan</name>
<email>arut@nginx.com</email>
</author>
<published>2023-08-14T05:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=eeb8a9f56f727d2543c8ae7feae0de784e329b27'/>
<id>eeb8a9f56f727d2543c8ae7feae0de784e329b27</id>
<content type='text'>
MTU selection starts by doubling the initial MTU until the first failure.
Then binary search is used to find the path MTU.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MTU selection starts by doubling the initial MTU until the first failure.
Then binary search is used to find the path MTU.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged with the default branch.</title>
<updated>2023-01-02T13:10:22+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2023-01-02T13:10:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f5aa66bd309a4cbec67285770c77db5d33347c27'/>
<id>f5aa66bd309a4cbec67285770c77db5d33347c27</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Style.</title>
<updated>2022-12-15T21:15:15+00:00</updated>
<author>
<name>BullerDu</name>
<email>yefei.dyf@alibaba-inc.com</email>
</author>
<published>2022-12-15T21:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=95133893f9821fd08619d5d2af71ea2c3345f095'/>
<id>95133893f9821fd08619d5d2af71ea2c3345f095</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged with the default branch.</title>
<updated>2022-12-15T15:40:44+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2022-12-15T15:40:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a1bb12e14ee86fdac2877c3a834b604f5bc522ae'/>
<id>a1bb12e14ee86fdac2877c3a834b604f5bc522ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed segfault when switching off master process during upgrade.</title>
<updated>2022-11-23T20:48:53+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2022-11-23T20:48:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=d52e5684437aedd6bb74d6b2b602b7306f4212ba'/>
<id>d52e5684437aedd6bb74d6b2b602b7306f4212ba</id>
<content type='text'>
Binary upgrades are not supported without master process, but it is,
however, possible, that nginx running with master process is asked
to upgrade binary, and the configuration file as available on disk
at this time includes "master_process off;".

If this happens, listening sockets inherited from the previous binary
will have ls[i].previous set.  But the old cycle on initial process
startup, including startup after binary upgrade, is destroyed by
ngx_init_cycle() once configuration parsing is complete.  As a result,
an attempt to dereference ls[i].previous in ngx_event_process_init()
accesses already freed memory.

Fix is to avoid looking into ls[i].previous if the old cycle is already
freed.

With this change it is also no longer needed to clear ls[i].previous in
worker processes, so the relevant code was removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Binary upgrades are not supported without master process, but it is,
however, possible, that nginx running with master process is asked
to upgrade binary, and the configuration file as available on disk
at this time includes "master_process off;".

If this happens, listening sockets inherited from the previous binary
will have ls[i].previous set.  But the old cycle on initial process
startup, including startup after binary upgrade, is destroyed by
ngx_init_cycle() once configuration parsing is complete.  As a result,
an attempt to dereference ls[i].previous in ngx_event_process_init()
accesses already freed memory.

Fix is to avoid looking into ls[i].previous if the old cycle is already
freed.

With this change it is also no longer needed to clear ls[i].previous in
worker processes, so the relevant code was removed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Process events posted by ngx_close_idle_connections() immediately.</title>
<updated>2022-11-18T15:31:38+00:00</updated>
<author>
<name>Roman Arutyunyan</name>
<email>arut@nginx.com</email>
</author>
<published>2022-11-18T15:31:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=17066ac8600412eabb1fdf8360cf6ada13f02391'/>
<id>17066ac8600412eabb1fdf8360cf6ada13f02391</id>
<content type='text'>
Previously, if an event was posted by a read event handler, called by
ngx_close_idle_connections(), that event was not processed until the next
event loop iteration, which could happen after a timeout.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if an event was posted by a read event handler, called by
ngx_close_idle_connections(), that event was not processed until the next
event loop iteration, which could happen after a timeout.
</pre>
</div>
</content>
</entry>
<entry>
<title>Events: fixed EPOLLRDHUP with FIONREAD (ticket #2367).</title>
<updated>2022-07-15T12:19:32+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2022-07-15T12:19:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=39b84d7a52c2d367d6baba85521c3e7cd0271961'/>
<id>39b84d7a52c2d367d6baba85521c3e7cd0271961</id>
<content type='text'>
When reading exactly rev-&gt;available bytes, rev-&gt;available might become 0
after FIONREAD usage introduction in efd71d49bde0.  On the next call of
ngx_readv_chain() on systems with EPOLLRDHUP this resulted in return without
any actions, that is, with rev-&gt;ready set, and this in turn resulted in no
timers set in event pipe, leading to socket leaks.

Fix is to reset rev-&gt;ready in ngx_readv_chain() when returning due to
rev-&gt;available being 0 with EPOLLRDHUP, much like it is already done in
ngx_unix_recv().  This ensures that if rev-&gt;available will become 0, on
systems with EPOLLRDHUP support appropriate EPOLLRDHUP-specific handling
will happen on the next ngx_readv_chain() call.

While here, also synced ngx_readv_chain() to match ngx_unix_recv() and
reset rev-&gt;ready when returning due to rev-&gt;available being 0 with kqueue.
This is mostly cosmetic change, as rev-&gt;ready is anyway reset when
rev-&gt;available is set to 0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When reading exactly rev-&gt;available bytes, rev-&gt;available might become 0
after FIONREAD usage introduction in efd71d49bde0.  On the next call of
ngx_readv_chain() on systems with EPOLLRDHUP this resulted in return without
any actions, that is, with rev-&gt;ready set, and this in turn resulted in no
timers set in event pipe, leading to socket leaks.

Fix is to reset rev-&gt;ready in ngx_readv_chain() when returning due to
rev-&gt;available being 0 with EPOLLRDHUP, much like it is already done in
ngx_unix_recv().  This ensures that if rev-&gt;available will become 0, on
systems with EPOLLRDHUP support appropriate EPOLLRDHUP-specific handling
will happen on the next ngx_readv_chain() call.

While here, also synced ngx_readv_chain() to match ngx_unix_recv() and
reset rev-&gt;ready when returning due to rev-&gt;available being 0 with kqueue.
This is mostly cosmetic change, as rev-&gt;ready is anyway reset when
rev-&gt;available is set to 0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged with the default branch.</title>
<updated>2022-07-26T15:54:11+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2022-07-26T15:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=41421e6e55ad59f87a6f98945feaf09b40b30ec1'/>
<id>41421e6e55ad59f87a6f98945feaf09b40b30ec1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
