Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 22127 invoked from network); 13 Dec 2003 20:13:02 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Dec 2003 20:13:02 -0000 Received: (qmail 5285 invoked by uid 500); 13 Dec 2003 20:12:46 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 5245 invoked by uid 500); 13 Dec 2003 20:12:46 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 5232 invoked from network); 13 Dec 2003 20:12:46 -0000 Received: from unknown (HELO prv-mail20.provo.novell.com) (137.65.81.122) by daedalus.apache.org with SMTP; 13 Dec 2003 20:12:46 -0000 Received: from INET-PRV-MTA by prv-mail20.provo.novell.com with Novell_GroupWise; Sat, 13 Dec 2003 13:12:51 -0700 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Beta Date: Sat, 13 Dec 2003 13:12:41 -0700 From: "Brad Nicholes" To: , Subject: Re: [PATCH] bug #18756 ldap cache and shared memory - cache init Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 500/1000/N Ah yes, now I remember. It was a chicken and egg problem. It's not a matter of st->cache_rmm being invalid, it is the fact that util_ald_alloc() expects to allocate from a util_ald_cache_t*, which is the reason why we are calling util_ald_create_cache() in the first place. We have to create one before we can allocate from it. +1 check-in Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com >>> apache@moresecurity.org Friday, December 12, 2003 3:57:08 PM >>> Hi, I think my mail wasn't clear :) All is about the util_ald_alloc function using shm or not, st->cache_rmm is valid :) At the beginning, it was util_ald_alloc(unsigned long size) and inside, when the configure set APR_SHARED_MEMORY, it was using a global rmm_addr. Then, the patch i did was changing to util_ald_alloc (apr_rmm_t rmm_addr, unsigned long size), but with this, it was breaking the code on plateform without SHM. To make it work with non SHM plateform, Brad changed util_ald_alloc to util_ald_alloc(util_ald_cache_t *cache, unsigned long size) and inside, use cache->rmm_addr if SHM plateform. The problem happen at line 304 of util_ldap_cache_mgr.c, when it create the cache, it use util_ald_alloc, but it's unable to give the alloc function the cache data, because it's not created yet. Actually, it's : cache = (util_ald_cache_t *)util_ald_alloc(st->cache_rmm, sizeof(util_ald_cache_t)); This is broken, because the alloc function doesn't receive apr_rmm but util_ald_cache_t. that's why i did this alloc directly with the apr_rmm functions. Matthieu Brad Nicholes wrote: > I don't have a problem with this patch, but since NetWare doesn't use >shared memory I am not able to trace down exactly what the issue is. >Can you describe the circumstance where the util_ald_create_cache() >function is called and st->cache_rmm is invalid? By simply looking >through the code, it appeared that st->cache_rmm is always set before >any call to util_ald_create_cache(). > >Brad > >Brad Nicholes >Senior Software Engineer >Novell, Inc., the leading provider of Net business solutions >http://www.novell.com > > > >>>>apache@moresecurity.org Thursday, December 11, 2003 1:51:49 AM >>> >>>> >>>> >Hi, > >st->cache_rmm is now invalid because due to non SHM plateform, >bnicholes >changed the alloc function util_ald_alloc to receive now >util_ald_cache_t and no more apr_rmm_t. >As we are just before the cache alloc, it's impossible to give >util_ald_alloc a cache object, that's why there, i did a basic alloc >functions. > > >Jeff Trawick wrote: > > > >>Matthieu Estrade wrote: >> >> >> >>>Here is a little patch, fixing the ldap cache using shared memory. >>>After the fix for plateform using SHM or not, it was a problem with >>> >>> > > > >>>cache init, unable to get it's rmm address to alloc memory. >>> >>> >>why is st->cache_rmm not filled out (or invalid)? >> >> >> >> > > > >