httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bennett, Tony - CNF" <>
Subject util_ldap_cache & shared memory failure
Date Wed, 18 Dec 2002 23:34:27 GMT
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:      <>
Subject:  mod_ldap and threaded MPMs
From:      <> Graham
Leggett <minfrin () sharp ! fm>
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 :)

----------------------------------------- "There's a moon
over Bourbon Street

-----Original Message-----
From: Bennett, Tony - CNF [] 
Sent: Wednesday, December 18, 2002 2:44 PM
To: ''
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,

util_ldap_init_module() in turn calls util_ldap_cache_init() (contained in

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

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 


View raw message