At a guess, I would guess the cache structure or some of the fields are being allocated out of a per-request pool, and that pool gets cleared before the next request.
// CREATE CACHE_ENTRY
cache_entry = (vhost_cache_entry *) apr_pcalloc(r->pool, sizeof(vhost_cache_entry));

I changed code to "cache_entry = (vhost_cache_entry *) apr_pcalloc(r->server->process->pool, sizeof(vhost_cache_entry));" but it looks like worst than before.
Maybe it is because i create this hash in pre_config fce:

static apr_status_t vhost_dbi_pre_config(apr_pool_t * pconf, apr_pool_t * plog, apr_pool_t * ptemp) {
   apr_status_t rv = APR_SUCCESS;
   vhost_cache = apr_hash_make(pconf);
   return rv;
}

It is very strange behavior because a few request is ok and after this one request retrieved damaged structure form hashtable. Structure contains some uppredictable data ... some chars from memory maybe, piece url or is completely empty. Maybe some thread stuffs ? ... is apr_hashtable thread safe ? according to logs every thinks looks like perfect ... cache expire etc ... but some times stucture lose its data...

Thanks for your help ... i can't find some suitable maillist :( ,

P.




Reply via email to