<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/os/unix, branch release-1.25.0</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<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>
<entry>
<title>Merged with the default branch.</title>
<updated>2022-06-22T14:34:58+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2022-06-22T14:34:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=c64e2ec1e94974193c286b63db4f58e6e499f5cb'/>
<id>c64e2ec1e94974193c286b63db4f58e6e499f5cb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed runtime handling of systems without EPOLLRDHUP support.</title>
<updated>2022-05-29T23:38:07+00:00</updated>
<author>
<name>Marcus Ball</name>
<email>marcus.ball@live.com</email>
</author>
<published>2022-05-29T23:38:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a4eddea7112cf5db86bea5ab9c8dcc597f2a1344'/>
<id>a4eddea7112cf5db86bea5ab9c8dcc597f2a1344</id>
<content type='text'>
In 7583:efd71d49bde0 (nginx 1.17.5) along with introduction of the
ioctl(FIONREAD) support proper handling of systems without EPOLLRDHUP
support in the kernel (but with EPOLLRDHUP in headers) was broken.

Before the change, rev-&gt;available was never set to 0 unless
ngx_use_epoll_rdhup was also set (that is, runtime test for EPOLLRDHUP
introduced in 6536:f7849bfb6d21 succeeded).  After the change,
rev-&gt;available might reach 0 on systems without runtime EPOLLRDHUP
support, stopping further reading in ngx_readv_chain() and ngx_unix_recv().
And, if EOF happened to be already reported along with the last event,
it is not reported again by epoll_wait(), leading to connection hangs
and timeouts on such systems.

This affects Linux kernels before 2.6.17 if nginx was compiled
with newer headers, and, more importantly, emulation layers, such as
DigitalOcean's App Platform's / gVisor's epoll emulation layer.

Fix is to explicitly check ngx_use_epoll_rdhup before the corresponding
rev-&gt;pending_eof tests in ngx_readv_chain() and ngx_unix_recv().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 7583:efd71d49bde0 (nginx 1.17.5) along with introduction of the
ioctl(FIONREAD) support proper handling of systems without EPOLLRDHUP
support in the kernel (but with EPOLLRDHUP in headers) was broken.

Before the change, rev-&gt;available was never set to 0 unless
ngx_use_epoll_rdhup was also set (that is, runtime test for EPOLLRDHUP
introduced in 6536:f7849bfb6d21 succeeded).  After the change,
rev-&gt;available might reach 0 on systems without runtime EPOLLRDHUP
support, stopping further reading in ngx_readv_chain() and ngx_unix_recv().
And, if EOF happened to be already reported along with the last event,
it is not reported again by epoll_wait(), leading to connection hangs
and timeouts on such systems.

This affects Linux kernels before 2.6.17 if nginx was compiled
with newer headers, and, more importantly, emulation layers, such as
DigitalOcean's App Platform's / gVisor's epoll emulation layer.

Fix is to explicitly check ngx_use_epoll_rdhup before the corresponding
rev-&gt;pending_eof tests in ngx_readv_chain() and ngx_unix_recv().
</pre>
</div>
</content>
</entry>
<entry>
<title>Core: added autotest for UDP segmentation offloading.</title>
<updated>2022-01-26T17:40:00+00:00</updated>
<author>
<name>Vladimir Homutov</name>
<email>vl@nginx.com</email>
</author>
<published>2022-01-26T17:40:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=05577c18a895d701cb00eef44d758ebf1bd00ddf'/>
<id>05577c18a895d701cb00eef44d758ebf1bd00ddf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
