The official NGINX Open Source repository.
Go to file
Roman Arutyunyan 2bae4205ab Core: fixed a race resulting in extra sem_post()'s.
The mtx->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->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->wait before the added code does.
However, that only leads to one extra iteration in the next call of
ngx_shmtx_lock().
2015-02-04 16:22:43 +03:00
auto Configure: remove outdated and unused patch.zlib.h. 2014-07-31 03:52:28 -07:00
conf MIME: added application/xspf+xml MIME type (ticket #479). 2014-03-06 10:51:08 +01:00
contrib Contrib: add more directives to vim syntax. 2014-10-22 15:31:19 +02:00
docs Year 2015. 2015-01-13 20:13:16 +03:00
misc Updated OpenSSL used for win32 builds. 2014-10-28 17:35:00 +03:00
src Core: fixed a race resulting in extra sem_post()'s. 2015-02-04 16:22:43 +03:00
.hgtags release-1.7.9 tag 2014-12-23 18:28:38 +03:00