httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45374] New: Shared memory error on starting httpd with mod_ldap
Date Thu, 10 Jul 2008 14:10:15 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45374

           Summary: Shared memory error on starting httpd with mod_ldap
           Product: Apache httpd-2
           Version: 2.2.9
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Keywords: PatchAvailable
          Severity: blocker
          Priority: P4
         Component: mod_ldap
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: philippe.duveau@free.fr


The shared cache can be enable in httpd 2.2.8 and 2.2.9.

Steps to reproduce:
==========================================

httpd.conf:

ServerRoot "D:/Apache2"
ServerName myserver.org
PidFile run/httpd.pid
ErrorLog logs/error.log
LogLevel warn
LoadModule ldap_module modules/mod_ldap.so
LDAPSharedCacheFile logs/ldap_cache
listen 80

The server stops immediatly with those logs :

[notice] Server built: May 16 2008 18:51:09
[notice] Parent: Created child process 4844
[error] (17)File exists: LDAP cache: could not create shared memory segment
Configuration Failed
[crit] master_main: create child process failed. Exiting.
[error] (OS 6)Descripteur non valide  : Parent: SetEvent for child process 0
failed


After investigation, the problem come from a fix in libapr (commit 570289, line
140 of apr/shmem/win32/shm.c)

To correct the problem you should apply the following patch :

Index: modules/ldap/util_ldap_cache.c
===================================================================
--- modules/ldap/util_ldap_cache.c      (revision 666274)
+++ modules/ldap/util_ldap_cache.c      (working copy)
@@ -404,6 +404,12 @@
     size = APR_ALIGN_DEFAULT(st->cache_bytes);

     result = apr_shm_create(&st->cache_shm, size, st->cache_file, st->pool);
+    if (result == APR_EEXIST) {
+               /* In case of existing cache file the apr_shm_create failed
returning APR_EEXIST
+                * So in this case, try to attach the existing file
+                */
+           result = apr_shm_attach(&st->cache_shm, st->cache_file, st->pool);
+    }
     if (result != APR_SUCCESS) {
         return result;
     }


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message