httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bennett, Tony - CNF" <Bennett.T...@cnf.com>
Subject util_ldap_cache & shared memory failure
Date Wed, 18 Dec 2002 23:34:27 GMT
Graham,
 
Is the problem I reported at the bottom the same as 
the problem you reported on 12-09-02, in this posting
and if so did you fix it?

List:      <http://marc.theaimsgroup.com/?l=apache-httpd-dev&r=1&w=2>
apache-httpd-dev
Subject:  mod_ldap and threaded MPMs
From:      <http://marc.theaimsgroup.com/?a=92425621400001&r=1&w=2> Graham
Leggett <minfrin () sharp ! fm>
Date:
<http://marc.theaimsgroup.com/?l=apache-httpd-dev&r=3&b=200212&w=2>
2002-12-09 8:46:01

Hi all,

When httpd is compiled with the worker MPM (threaded), mod_ldap's 
connection pool fails - many connections to the LDAP server are opened 
until connections run out. The prefork MPM seems to work fine.

I don't have much time this week to look at this, if someone who knows 
threads and locking could look at this I would be very grateful :)

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."


-Tony
-----Original Message-----
From: Bennett, Tony - CNF [mailto:Bennett.Tony@cnf.com] 
Sent: Wednesday, December 18, 2002 2:44 PM
To: 'auth_ldap@rudedog.org'
Cc: apache-modules@covalent.net
Subject: [Auth_ldap] util_ldap_cache & shared memory failure



Sorry for the cross post, but I'm not sure which group 
is appropriate. 

I am getting the following message in my apache error log 

        [Wed Dec 18 11:23:18 2002] [debug] util_ldap_cache.c(307): (17)Do
not specify an existing file. 

I believe I have tracked this down to a problem with util_ldap_cache.c. 

util_ldap.c has registered its util_ldap_init_module() function to be called

during "child_init" as follows: 

        ap_hook_child_init(util_ldap_init_module, NULL, NULL,
APR_HOOK_MIDDLE); 

util_ldap_init_module() in turn calls util_ldap_cache_init() (contained in
util_ldap_cache.c). 

util_ldap_cache_init() tries to create a shared memory segment by calling
apr_shm_create() 
as follows: 
         result = apr_shm_create(&util_ldap_shm, reqsize, "/tmp/ldap_cache",
pool); 

This call fails for all but the first time it is called... with the message
shown at the top. 
The failure causes util_ldap_cache_init() to return immediately... and not
complete the function.  
The failure is because apr_shm_create() expects the file, "/tmp/ldap_cache",
to be non-existent... 
...and it will create it... if it exists, then the function fails. 

If I'm not mistaken, I don't believe the shared memory should be "created"
for each child. 

Using mod_auth_digest, and mod_ssl as a model... it appears it should be
created in a 
ap_hook_post_config() hook.  

Does this seem correct??? 

Here's my Environment: 
        Version:        Apache 2.0.42 
        OS:             AIX 4.3.3 
        Compiler:       IBM C for AIX version 6.0 

Thanks, 
-tony 



Mime
View raw message