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

LDAP_PVT_THREAD_STACK_SIZE breaks slapd (ITS#1707)

Full_Name: Hallvard B. Furuseth
Version: 2.1.0alpha
OS: Linux
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)