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

RE: LDAP_PVT_THREAD_STACK_SIZE breaks slapd (ITS#1707)

The affected code in filterindex.c no longer exists, it has been rewritten
in HEAD. 2.1.0alpha is already quite out of date and you should be testing
against HEAD anyway since 2.1.0beta will probably be released soon.

You're right that the Configure script still needs a test to see if
LDAP_PVT_THREAD_STACK_SIZE should be defined. On Linux glibc2.0 there is no
function in the pthreads library to set it at all; in glibc 2.1 the function
quietly fails if the requested size is too big but that generally doesn't
cause any problems. The big hassle is on glibc 2.0 because the libldap_r
will fail to link due to the missing pthread_set_stacksize().

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> h.b.furuseth@usit.uio.no
> Sent: Tuesday, April 02, 2002 12:45 AM
> To: openldap-its@OpenLDAP.org
> Subject: LDAP_PVT_THREAD_STACK_SIZE breaks slapd (ITS#1707)
> Full_Name: Hallvard B. Furuseth
> Version: 2.1.0alpha
> OS: Linux
> URL:
> Submission from: (NULL) (
> slapd sometimes dies in test003-search on the line
> 	back-bdb/filterindex.c:151:		BDB_IDL_ALL( bdb, save );
> unless it is compiled with
> You had better remove the code in include/ldap_pvt_thread.h which sets
> LDAP_PVT_THREAD_STACK_SIZE unless it is #defined already.  When you know
> how (i.e. when you have a configure test), replace it with code which
> only sets it on systems can increase the thread stack size.
> BTW, note that the filterindex.c doesn't care about the actual value of
> the symbol, only to whether or not it is 0.  OTOH, its #definition in
> ldap_pvt_thread.h thinks the stack size in matters.  So if you are going
> to define the stack *size*, filterindex.c needs to somehow estimate the
> current stack size.  I don't see how.  Maybe it's better to use a
> LDAP_PVT_VARIABLE_THREAD_STACK_SIZE symbol with a true/false value, like
> filterindex.c thinks.
> Currently, I'm doing this:
> --- include/ldap_pvt_thread.h~	Fri Jan  4 20:40:30 2002
> +++ include/ldap_pvt_thread.h	Mon Apr  1 13:37:45 2002
> @@ -42,5 +42,5 @@
> +#if 0 /* !defined(LDAP_PVT_THREAD_STACK_SIZE) */
>  	/* LARGE stack */
>  #define LDAP_PVT_THREAD_STACK_SIZE	(16*1024*1024)