Welcome! Log In Create A New Profile


[nginx] svn commit: r4341 - trunk/src/http

Anonymous User
December 12, 2011 05:50AM
Author: mdounin
Date: 2011-12-12 10:49:14 +0000 (Mon, 12 Dec 2011)
New Revision: 4341

Cache: only complain on long locked entries.

There have been multiple reports of cases where a real locked entry was
removed, resulting in a segmentation fault later in a worker which locked
the entry. It looks like default inactive timeout isn't enough in real

For now just ignore such locked entries, and move them to the top of the
inactive queue to allow processing of other entries.


Modified: trunk/src/http/ngx_http_file_cache.c
--- trunk/src/http/ngx_http_file_cache.c 2011-12-12 10:47:48 UTC (rev 4340)
+++ trunk/src/http/ngx_http_file_cache.c 2011-12-12 10:49:14 UTC (rev 4341)
@@ -1113,12 +1113,12 @@
* abnormally exited workers may leave locked cache entries,
* and although it may be safe to remove them completely,
- * we prefer to remove them from inactive queue and rbtree
- * only, and to allow other leaks
+ * we prefer to just move them to the top of the inactive queue

- ngx_rbtree_delete(&cache->sh->rbtree, &fcn->node);
+ fcn->expire = ngx_time() + cache->inactive;
+ ngx_queue_insert_head(&cache->sh->queue, &fcn->queue);

ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
"ignore long locked inactive cache entry %*s, count:%d",

nginx-devel mailing list
Subject Author Views Posted

[nginx] svn commit: r4341 - trunk/src/http

Anonymous User 1601 December 12, 2011 05:50AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 322
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready