There are numerous reports of Apache HTTPD looping forever on Windows
unless the LDAPSharedCacheSize option is set to zero.

See for instance:

I looked around for a while but don't know yet if a corresponding issue
in the HTTPD bug tracker exists. Does anyone know?

On the surface it looks like a memory pool corruption bug to me.
The stack trace posted in
points towards an endless loop in apr_pool_cleanup_kill().
The trace ends at APR-util's misc/apr_reslist.c:apr_reslist_cleanup_order_set,
and of the functions this calls only apr_pool_cleanup_kill() contains loops.

I could not do any further debugging since I only had a production setup
to look at, which is stable with the workaround 'LDAPSharedCacheSize 0'.
I also do not have a Windows dev environment and I don't plan on digging
any further.

Until the real bug gets found and fixed, I would recommend making the
known workaround the default on Windows. Because the winnt MPM runs a
single process, there is no benefit to a shared memory cache anyway.

Should I commit this patch?

Index: modules/ldap/util_ldap.c
--- modules/ldap/util_ldap.c    (revision 1803972)
+++ modules/ldap/util_ldap.c    (working copy)
@@ -2815,7 +2815,17 @@ static void *util_ldap_create_config(apr_pool_t *p
     apr_thread_mutex_create(&st->mutex, APR_THREAD_MUTEX_DEFAULT, st->pool);
+#ifdef WIN32
+    /* XXX The shared memory cache can cause an endless loop on Windows.
+     * See and
+     * similar reports elsewhere which recommend 'LDAPSharedCacheSize 0'
+     * as a workaround.
+     * Because the winnt MPM uses a single process a shared cache is
+     * not needed anyway so leave it disabled by default. */
+    st->cache_bytes = 0;
     st->cache_bytes = 500000;
     st->search_cache_ttl = 600000000;
     st->search_cache_size = 1024;
     st->compare_cache_ttl = 600000000;

Reply via email to