<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/core/ngx_shmtx.c, branch release-1.28.2</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Core: fixed build on Tru64 UNIX.</title>
<updated>2015-02-09T22:51:08+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2015-02-09T22:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=66c25a7d7763b8a6bd4215b4af9f9fcc3f4d061a'/>
<id>66c25a7d7763b8a6bd4215b4af9f9fcc3f4d061a</id>
<content type='text'>
There was a typo in NGX_EACCES.

Reported by Goetz T. Fischer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There was a typo in NGX_EACCES.

Reported by Goetz T. Fischer.
</pre>
</div>
</content>
</entry>
<entry>
<title>Core: fixed a race resulting in extra sem_post()'s.</title>
<updated>2015-02-04T13:22:43+00:00</updated>
<author>
<name>Roman Arutyunyan</name>
<email>arut@nginx.com</email>
</author>
<published>2015-02-04T13:22:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=2bae4205abd1583a5f3e2dfdc3174c1ef0c3828d'/>
<id>2bae4205abd1583a5f3e2dfdc3174c1ef0c3828d</id>
<content type='text'>
The mtx-&gt;wait counter was not decremented if we were able to obtain the lock
right after incrementing it.  This resulted in unneeded sem_post() calls,
eventually leading to EOVERFLOW errors being logged, "sem_post() failed
while wake shmtx (75: Value too large for defined data type)".

To close the race, mtx-&gt;wait is now decremented if we obtain the lock right
after incrementing it in ngx_shmtx_lock().  The result can become -1 if a
concurrent ngx_shmtx_unlock() decrements mtx-&gt;wait before the added code does.
However, that only leads to one extra iteration in the next call of
ngx_shmtx_lock().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mtx-&gt;wait counter was not decremented if we were able to obtain the lock
right after incrementing it.  This resulted in unneeded sem_post() calls,
eventually leading to EOVERFLOW errors being logged, "sem_post() failed
while wake shmtx (75: Value too large for defined data type)".

To close the race, mtx-&gt;wait is now decremented if we obtain the lock right
after incrementing it in ngx_shmtx_lock().  The result can become -1 if a
concurrent ngx_shmtx_unlock() decrements mtx-&gt;wait before the added code does.
However, that only leads to one extra iteration in the next call of
ngx_shmtx_lock().
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed location of debug message in ngx_shmtx_lock().</title>
<updated>2012-11-21T14:23:26+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2012-11-21T14:23:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=9f385870f663ff48a511e07e63e85d28737c3384'/>
<id>9f385870f663ff48a511e07e63e85d28737c3384</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed typo in a function name.</title>
<updated>2012-07-03T13:06:40+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2012-07-03T13:06:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=bbfc96c7034bff4e94cf80538d630d06bd2334ee'/>
<id>bbfc96c7034bff4e94cf80538d630d06bd2334ee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Copyright updated.</title>
<updated>2012-01-18T15:07:43+00:00</updated>
<author>
<name>Maxim Konovalov</name>
<email>maxim@nginx.com</email>
</author>
<published>2012-01-18T15:07:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f8d59e33f34185c28d1d3c6625a897e214b7ca73'/>
<id>f8d59e33f34185c28d1d3c6625a897e214b7ca73</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added (void) as we intentionally ignore returned values.</title>
<updated>2011-11-28T11:01:42+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-11-28T11:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a4484b13694f00c4131c940e6b75690e424dfead'/>
<id>a4484b13694f00c4131c940e6b75690e424dfead</id>
<content type='text'>
Requested by Igor Sysoev.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Requested by Igor Sysoev.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed build without atomic operations.</title>
<updated>2011-11-23T14:07:06+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-11-23T14:07:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=ddb7cd1c410a7166d8e28092d714f782ed1d69b3'/>
<id>ddb7cd1c410a7166d8e28092d714f782ed1d69b3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added shmtx interface to forcibly unlock mutexes.</title>
<updated>2011-11-23T13:55:38+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2011-11-23T13:55:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=91ecc8f43c42c677cd7b2230a68f19b64b649ba5'/>
<id>91ecc8f43c42c677cd7b2230a68f19b64b649ba5</id>
<content type='text'>
It is currently used from master process on abnormal worker termination to
unlock accept mutex (unlocking of accept mutex was broken in 1.0.2).  It is
expected to be used in the future to unlock other mutexes as well.

Shared mutex code was rewritten to make this possible in a safe way, i.e.
with a check if lock was actually held by the exited process.  We again use
pid to lock mutex, and use separate atomic variable for a count of processes
waiting in sem_wait().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is currently used from master process on abnormal worker termination to
unlock accept mutex (unlocking of accept mutex was broken in 1.0.2).  It is
expected to be used in the future to unlock other mutexes as well.

Shared mutex code was rewritten to make this possible in a safe way, i.e.
with a check if lock was actually held by the exited process.  We again use
pid to lock mutex, and use separate atomic variable for a count of processes
waiting in sem_wait().
</pre>
</div>
</content>
</entry>
<entry>
<title>use POSIX semaphores in shmtx instead of sched_yield()</title>
<updated>2011-05-10T11:39:13+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2011-05-10T11:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=e2c8ad71221ebcf5ca6331811118f9a6d18aec45'/>
<id>e2c8ad71221ebcf5ca6331811118f9a6d18aec45</id>
<content type='text'>
number of spinlock spins are increased twice
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
number of spinlock spins are increased twice
</pre>
</div>
</content>
</entry>
<entry>
<title>fix building on platforms with non-supported atomic operations</title>
<updated>2007-02-11T07:49:12+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2007-02-11T07:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=8e750112f6917061e55d6cf6d55e75a9e6ebd811'/>
<id>8e750112f6917061e55d6cf6d55e75a9e6ebd811</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
