[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Still thread problems with 1.1.4



Pierangelo,

On Fri, 19 Feb 1999, Pierangelo Masarati wrote:

> Hi.
> 
> 
> > I had some thread problems with
> > OpenLDAP 1.1.2 earlier, these are still
> > present with 1.1.4 - see attachment.
> > In effect the server hangs after 
> > a while.
> > 
> > The platform is RedHat 5.1 Intel
> > with the most recent glibc rpm's
> > installed.
> > 
> > -psi
> > 
> 
> 
> I have the same problem you emphasized. It didn't disappear
> even with OpenLDAP 1.2. But I noticed that your slapd runs
> out of resources always after search 340, exactly as mine does. 
> Every search involves 3 thread creations: do_bind(), do_search() 
> and do_unbind(), which makes 1020 threads. /usr/include/pthread.h 
> of my RedHat 5.1 indirectly includes /usr/include/local_lim.h 
> where there is a #define PTHREAD_THREADS_MAX 1024. In my opinion 
> the slapd process simply runs out of threads. They are detached 
> at creation (at least in my configuration, which should be like 
> yours, since we use the same RedHat release), but eventually they
>  don't terminate correctly. Maybe pthread_exit() is not invoked 
> at the end of connection_operation()
> 
> I'd like to know if you found out anything else.

I struggled with this exact same problem, hoping each new release would
fix the thing.  I had the problem on one machine, but not on another.  The
thing I found to be the cause of the problem was the version of glibc.

The version with 5.1 is glibc-2.0.7-17.  I upgraded to glibc-2.0.7-29, and
the problems went away. That, and there is a typo in servers/slapd/main.c.
It says HAVE_PHRREADS_FINAL instead of HAVE_PTHREADS_FINAL.  I don't know
if this has anything to do with it (combination of stuff).  Just changing
that to the correct spelling didn't fix the problem.

My suggestion is to upgrade glibc* to 2.0.7-29 (I'm not sure what version
some people consider "latest").  Also check /lib/libpthread-0.7.so.  It is
198784 bytes, MD5 = e82d06da5bffcd752bfca1c80f498b22 (with 2.0.7-29).

I thought I posted this to the FAQ-O-Matic.  I will now.

Don
-- 
Don Badrak <dbadrak@census.gov>              301.457.8263 work
Telecommunications Office		     301.457.4438 fax
U.S. Bureau of the Census
Suitland MD, USA