<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/src, branch 1.11.0-1</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Basic support for serving static files.</title>
<updated>2019-09-18T23:47:09+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2019-09-18T23:47:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=08a8d1510d5f73d91112ead9e6ac075fb7d2bac0'/>
<id>08a8d1510d5f73d91112ead9e6ac075fb7d2bac0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial applications isolation support using Linux namespaces.</title>
<updated>2019-09-19T12:25:23+00:00</updated>
<author>
<name>Tiago de Bem Natel de Moura</name>
<email>t.nateldemoura@f5.com</email>
</author>
<published>2019-09-19T12:25:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=c554941b4f826d83d92d5ca8d7713bea4167896e'/>
<id>c554941b4f826d83d92d5ca8d7713bea4167896e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Releasing WebSocket frame in case of buffer allocation failure.</title>
<updated>2019-09-19T13:28:03+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2019-09-19T13:28:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=6346e641eef4aacf92e81e0f1ea4f42ed1e62834'/>
<id>6346e641eef4aacf92e81e0f1ea4f42ed1e62834</id>
<content type='text'>
Found by Coverity (CID 349456).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found by Coverity (CID 349456).
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing master process crash after failed fork.</title>
<updated>2019-09-18T19:45:30+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2019-09-18T19:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=1fac43eebe4136a2f57c56f23fc90a33783e63f2'/>
<id>1fac43eebe4136a2f57c56f23fc90a33783e63f2</id>
<content type='text'>
This closes #312 issue on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This closes #312 issue on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Go: removing nxt_main.h usage.</title>
<updated>2019-09-18T15:31:29+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2019-09-18T15:31:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=ab40ce3757e6f9d50c9c1a8aa4ea01cb5278eafa'/>
<id>ab40ce3757e6f9d50c9c1a8aa4ea01cb5278eafa</id>
<content type='text'>
One small step to Go modules support.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One small step to Go modules support.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing request release order to avoid crashes on exit.</title>
<updated>2019-09-18T15:31:22+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2019-09-18T15:31:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=a216b15e991d6e7cdc7b61fe018d58dd387937bd'/>
<id>a216b15e991d6e7cdc7b61fe018d58dd387937bd</id>
<content type='text'>
Each request references the router process structure that owns all memory
maps.  The process structure has a reference counter; each request increases
the counter to lock the structure in memory until request processing ends.
Incoming and outgoing buffers reference memory maps that the process owns,
so the process structure should be released only when all buffers are
released to avoid invalid memory access and a crash.

This describes the libunit library mechanism used for application processes.

The background of this issue is as follows:

The issue was found on buildbot when the router crashed during Java
websocket tests.  The Java application receives a notification from the
master process; when the notification is processed, libunit deletes the
process structure from its process hash and decrements the use counter;
however, active websocket connections maintain their use counts on the
process structure.  After that, when the master process is stopping the
application, libunit releases active websocket connections.  At this point,
it's important to release the connections' memory buffers before the
corresponding process structure and all shared memory segments are released.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each request references the router process structure that owns all memory
maps.  The process structure has a reference counter; each request increases
the counter to lock the structure in memory until request processing ends.
Incoming and outgoing buffers reference memory maps that the process owns,
so the process structure should be released only when all buffers are
released to avoid invalid memory access and a crash.

This describes the libunit library mechanism used for application processes.

The background of this issue is as follows:

The issue was found on buildbot when the router crashed during Java
websocket tests.  The Java application receives a notification from the
master process; when the notification is processed, libunit deletes the
process structure from its process hash and decrements the use counter;
however, active websocket connections maintain their use counts on the
process structure.  After that, when the master process is stopping the
application, libunit releases active websocket connections.  At this point,
it's important to release the connections' memory buffers before the
corresponding process structure and all shared memory segments are released.
</pre>
</div>
</content>
</entry>
<entry>
<title>Go: do not store pointer to Go object.</title>
<updated>2019-09-18T15:31:14+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2019-09-18T15:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=84e4a6437f69b14b1cafbe7915447fdcf1d87f68'/>
<id>84e4a6437f69b14b1cafbe7915447fdcf1d87f68</id>
<content type='text'>
To pass Go object references to C and back we use hack with casting to
unsafe and then to uintptr.  However, we should not store such references
because Go not guaratnee it will be available by the same address.
Introducing map with integer key helps to avoid dereference stored address.

This closes #253 and #309 issues on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To pass Go object references to C and back we use hack with casting to
unsafe and then to uintptr.  However, we should not store such references
because Go not guaratnee it will be available by the same address.
Introducing map with integer key helps to avoid dereference stored address.

This closes #253 and #309 issues on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reducing number of warning messages.</title>
<updated>2019-09-18T15:31:06+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2019-09-18T15:31:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=4ea9ed309e958ad087ddcfd358688e2a2f105e39'/>
<id>4ea9ed309e958ad087ddcfd358688e2a2f105e39</id>
<content type='text'>
One alert per failed allocation is enough.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One alert per failed allocation is enough.
</pre>
</div>
</content>
</entry>
<entry>
<title>Protecting context structures with mutex.</title>
<updated>2019-09-18T15:30:58+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2019-09-18T15:30:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=9bacd21405de021fa846bac95b7e3fb796763a80'/>
<id>9bacd21405de021fa846bac95b7e3fb796763a80</id>
<content type='text'>
By design, Unit context is created for the thread which reads messages from
the router.  However, Go request handlers are called in a separate goroutine
that may be executed in a different thread.  To avoid a racing condition,
access to lists of free structures in the context should be serialized.  This
patch should fix random crashes in Go applications under high load.

This is related to #253 and #309 issues on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By design, Unit context is created for the thread which reads messages from
the router.  However, Go request handlers are called in a separate goroutine
that may be executed in a different thread.  To avoid a racing condition,
access to lists of free structures in the context should be serialized.  This
patch should fix random crashes in Go applications under high load.

This is related to #253 and #309 issues on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Configuration: added ability to modify object members with slashes.</title>
<updated>2019-09-18T13:03:28+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2019-09-18T13:03:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=ca01845d89968ef8b726f8e4a683a06c518755e4'/>
<id>ca01845d89968ef8b726f8e4a683a06c518755e4</id>
<content type='text'>
Example:

  PUT/POST/DELETE /config/listeners/unix:%2Fpath%2Fto%2Fsocket

This follows a49ee872e83d.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Example:

  PUT/POST/DELETE /config/listeners/unix:%2Fpath%2Fto%2Fsocket

This follows a49ee872e83d.
</pre>
</div>
</content>
</entry>
</feed>
