More on 'group cache is full' problem ...

Richard Michael Todd rmtodd at mailhost.ecn.ou.edu
Thu Sep 9 05:40:57 UTC 1999


In message <Pine.BSF.4.10.9909082314550.412-100000 at thelab.hub.org>you write:
>
>Not sure what kind of tracing you'd like to see, but the error is
>generated at like 609 in ov3.c...I'm here all night, and am willing to try
>just about anything to correct this:

The error is *signalled* there, but it is generated by some other part
of the code not having decremented the refcount on the cache entry
(the "ce->refcount" below), causing OV3cleancache to think all the
cache entries are currently being used and thus unavailable to be 
recycled for use by other groups.   The Thing to Do to track this down
would be to put in suitable printfs in OV3opengroup() and OV3closegroup()
to see where they get called, and what they get called with.  
Specifically, I'd start by looking for cases where 
OV3opengroup("group.name", needcache=1) gets called, followed by
OV3closegroup("group.name", needcache=0), or something like that. 
The problem is calls to OV3opengroup("group.name", needcache=1) without
a matching call to OV3closegroup with needcache also == to 1.


>STATIC void OV3cleancache(void) {
>    int                 i;
>    CACHEENTRY          *ce, *prev;
>    CACHEENTRY          *saved = NULL;
>    CACHEENTRY          *sprev = NULL;
>    int                 savedbucket;
>
>    while (CACHEentries >= CACHEmaxentries) {
>        for (i = 0; i < CACHETABLESIZE; i++) {
>            for (prev = NULL, ce = CACHEdata[i]; ce != NULL; prev = ce, ce = c
>e->next) {
>                if (ce->refcount > 0)
>                    continue;
>                if ((saved == NULL) || (saved->lastused > ce->lastused)) {
>                    saved = ce;
>                    sprev = prev;
>                    savedbucket = i;
>                }
>            }
>        }
>
>        if (saved != NULL) {
>            OV3closegroupfiles(saved->gh);
>            if (sprev) {
>                sprev->next = saved->next;
>            } else {
>                CACHEdata[savedbucket] = saved->next;
>            }
>            DISPOSE(saved);
>            CACHEentries--;
>            return;
>        }
>        syslog(L_NOTICE, "tradindexed: group cache is full, waiting 10 seconds
>");
>        sleep(10);
>    }
>}
>
>
>


More information about the inn-workers mailing list