<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/src, branch 1.22.0</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Fixing shared app queue unmap size.</title>
<updated>2021-02-03T20:23:28+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-02-03T20:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=75a5dcfc4ec4f92a196c0cf3a187081a238a6b1d'/>
<id>75a5dcfc4ec4f92a196c0cf3a187081a238a6b1d</id>
<content type='text'>
Shared app queue takes more memory than port memory.  To unmap all memory pages
correct size need to be specified for munmap() call.  Otherwise 4 Mb memory
leaked on each configured application removal.

The issue was introduced in 1d84b9e4b459.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Shared app queue takes more memory than port memory.  To unmap all memory pages
correct size need to be specified for munmap() call.  Otherwise 4 Mb memory
leaked on each configured application removal.

The issue was introduced in 1d84b9e4b459.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing possible NULL dereference.</title>
<updated>2021-02-03T20:23:17+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-02-03T20:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=b1685dbc769a1b62eedc3249697c30d8770fc8c3'/>
<id>b1685dbc769a1b62eedc3249697c30d8770fc8c3</id>
<content type='text'>
For listen socket request reply port can be NULL if Router crashes immediately
after issuing the request.

Found by Coverity (CID 366310).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For listen socket request reply port can be NULL if Router crashes immediately
after issuing the request.

Found by Coverity (CID 366310).
</pre>
</div>
</content>
</entry>
<entry>
<title>Using shared memory to pass configuration to main process.</title>
<updated>2021-02-03T20:23:06+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-02-03T20:23:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=8c88537e6ee0c0a2ae1c323b8cce09522240471b'/>
<id>8c88537e6ee0c0a2ae1c323b8cce09522240471b</id>
<content type='text'>
This patch is required to remove fragmented messages functionality.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is required to remove fragmented messages functionality.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed building by GCC 10 with -flto and -O2.</title>
<updated>2021-02-01T15:55:49+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2021-02-01T15:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=93ac087e9684c63f82df36f847bf9239e2eb185e'/>
<id>93ac087e9684c63f82df36f847bf9239e2eb185e</id>
<content type='text'>
This closes #467 issue on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This closes #467 issue on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Removing unused mutex from nxt_process_t.</title>
<updated>2021-01-28T15:32:12+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-01-28T15:32:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=46a8c98a1aa6e0c4b86a72b8f8fe47878012afb1'/>
<id>46a8c98a1aa6e0c4b86a72b8f8fe47878012afb1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Router: fixing crash after WebSocket processing.</title>
<updated>2021-01-28T14:13:52+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-01-28T14:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=e4e444b82701de0c984a72eb9c2657f72d7171ae'/>
<id>e4e444b82701de0c984a72eb9c2657f72d7171ae</id>
<content type='text'>
After WebSocket processing, the application port was released with incorrect
reason ("got request"), unnecessarily decrementing the active request counter.

The assertion was triggered only on application removal; a test was added
for this case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After WebSocket processing, the application port was released with incorrect
reason ("got request"), unnecessarily decrementing the active request counter.

The assertion was triggered only on application removal; a test was added
for this case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Router: fixing error handling in config request.</title>
<updated>2021-01-27T14:32:03+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-01-27T14:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=3855f1c032cb52f4e8f370f639d259b7cc313939'/>
<id>3855f1c032cb52f4e8f370f639d259b7cc313939</id>
<content type='text'>
The controller process awaits the response from the router for every
configration change request.  This patch adds error reporting for various error
conditions which may happen because of file descriptors or memory shortage.

Lack of a response lead to the controller awaiting the response, thus being
unable to process other client reconfiguration requests that also became stuck.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The controller process awaits the response from the router for every
configration change request.  This patch adds error reporting for various error
conditions which may happen because of file descriptors or memory shortage.

Lack of a response lead to the controller awaiting the response, thus being
unable to process other client reconfiguration requests that also became stuck.
</pre>
</div>
</content>
</entry>
<entry>
<title>Router: fixing assertion in shortage of file descriptors.</title>
<updated>2021-01-25T10:13:17+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-01-25T10:13:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9b76505bf7fe7954ebd66e23fc29dab2e6b02e47'/>
<id>9b76505bf7fe7954ebd66e23fc29dab2e6b02e47</id>
<content type='text'>
Each application in router process required fd for a request queue shared
memory.  When the number of file descripts close to the limit, and port sockets
successfully opened, router needs to properly handle the errors.

This patch closes port sockets before destroying port structure to avoid
file descriptors leakage and assertion in debug build.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each application in router process required fd for a request queue shared
memory.  When the number of file descripts close to the limit, and port sockets
successfully opened, router needs to properly handle the errors.

This patch closes port sockets before destroying port structure to avoid
file descriptors leakage and assertion in debug build.
</pre>
</div>
</content>
</entry>
<entry>
<title>Libunit: processing single port message.</title>
<updated>2020-12-29T16:01:24+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2020-12-29T16:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d65a66f9d813294917822554311281c5e1a7126b'/>
<id>d65a66f9d813294917822554311281c5e1a7126b</id>
<content type='text'>
This partially reverts the optimisation introduced in 1d84b9e4b459 to avoid an
unpredictable block in nxt_unit_process_port_msg().  Under high load, this
function may never return control to its caller, and the external event loop
(in Node.js and Python asyncio) won't be able to process other scheduled
events.

To reproduce the issue, two request processing types are needed: 'fast' and
'furious'.  The 'fast' one simply returns a small response, while the 'furious'
schedules asynchronous calls to external resources.  Thus, if Unit is subjected
to a large amount of 'fast' requests, the 'furious' request processing freezes
until the high load ends.

The issue was found by Wu Jian Ping (@wujjpp) during Node.js stream
implementation discussion and relates to PR #502 on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This partially reverts the optimisation introduced in 1d84b9e4b459 to avoid an
unpredictable block in nxt_unit_process_port_msg().  Under high load, this
function may never return control to its caller, and the external event loop
(in Node.js and Python asyncio) won't be able to process other scheduled
events.

To reproduce the issue, two request processing types are needed: 'fast' and
'furious'.  The 'fast' one simply returns a small response, while the 'furious'
schedules asynchronous calls to external resources.  Thus, if Unit is subjected
to a large amount of 'fast' requests, the 'furious' request processing freezes
until the high load ends.

The issue was found by Wu Jian Ping (@wujjpp) during Node.js stream
implementation discussion and relates to PR #502 on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Node.js: ServerRequest and ServerResponse compliance to Stream API.</title>
<updated>2020-12-29T16:00:54+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2020-12-29T16:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d3d6864bdc64f34924e686ff65da704b29aaaa93'/>
<id>d3d6864bdc64f34924e686ff65da704b29aaaa93</id>
<content type='text'>
ServerRequest now inherit stream Readable object.  ServerResponse
provides 'writable' property.

Thanks to Wu Jian Ping (@wujjpp).

This closes #274, closes #317 issues and closes #502 PR on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ServerRequest now inherit stream Readable object.  ServerResponse
provides 'writable' property.

Thanks to Wu Jian Ping (@wujjpp).

This closes #274, closes #317 issues and closes #502 PR on GitHub.
</pre>
</div>
</content>
</entry>
</feed>
