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

Re: OpenLDAP under Solaris

At 08:21 PM 1/21/99 -0500, Roy Hooper wrote:
>Good and bad news about OpenLDAP under Solaris 2.6_x86:
>	- threads don't work worth a damn.  Under heavy load, the server dies an
>unexpected death, and does not generate a core file (unless you run it
>with -d).

Assuming your environment is setup properly to allow coredumps, I suspect
a malloc is failing causing exit(1) to be called.  You can verify this
by running -d 8192 (which will only match LDAP_DEBUG_ANY).

>The closest to anything useful i've been able to get is that the
>server is dying in _lwp_mutex_unlock().  Without debug information,
>occasionally I got stack traces, but all in hex after _lwp_mutex_unlock().
>With debug information, I only ever got a stack trace from gdb with one
>resolvable item: _lwp_mutex_unlock().

Debugging in threaded environments is quite painful, especially
with 3rd party debuggers.  You might try using Sun LWP tools
(I assume they must provide some decent tools for debugging LWP

>	- with a simple patch (attached), you can get OpenLDAP to compile in a
>useable manner:
>		LIBS="-lposix4 -lpthread"; export LIBS; ./configure --without-threads

Why the LIBS with --without-threads?   I am not sure this is safe or not.

>I make no guarantees that this patch will actually be a good thing, or that
>it even works anywhere but here.

It doesn't.  __sun__ is defined on (existing or future) systems without
this problem.  And this problem may exist on systems that don't define
__sun__.  In general, it's best to test for specific characteristics
of the environment (using autoconf) and then define per-characteristic
defines as needed.

We are experimenting with such a test in -devel for release with 1.2.
For 2.0 we're reworking the name space consumed by our internal thread
support library.