[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5546) slapd aborts using slapo-pcache when caching negative searches



Full_Name: Toby Blake
Version: 2.4.10
OS: Scientific Linux 5.1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (129.215.218.33)


Hi there,

If I specify a negative ttl when using slapo-pcache, e.g...

overlay                 pcache
proxycache              bdb 5000 1 500 300
proxycachequeries       10000

proxyattrset            0 uid
# proxytemplate using ttl and negative ttl of 1800
proxytemplate           (uid=) 0 1800 1800

... slapd aborts whenever there is a negative search to cache.  The cause of
this seems to be the assert(0) in pcache.c:pcache_op_cleanup, code fragment
starting line 2010...

switch ( si->caching_reason ) {
case PC_POSITIVE:
    cache_entries( op, rs, &qc->q_uuid );
    break;

case PC_SIZELIMIT:
    qc->q_sizelimit = rs->sr_nentries;
    break;
default:
    assert( 0 );
    break;
}

The value of si>caching_reason when slapd SIGABRTs is PC_NEGATIVE (which isn't
handled by the switch statement).

Let me know if you need any more info...

Cheers
Toby Blake
School of Informatics
University of Edinburgh