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

(ITS#4842) Can slapd run with only one thread to operate

Full_Name: Seuler.Shi
Version: 2.3.30
OS: SUSE server 9.2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

The threads parameter in slapd.conf can not be configured below 2.
I pretend to eleminate this limit by removing the folloing code in
servers\slapd\bconfig.c file
if ( c->value_int < 2 ) {
    snprintf( c->msg, sizeof( c->msg ),
     "threads=%d smaller than minimum value 2",
     c->value_int );
    Debug(LDAP_DEBUG_ANY, "%s: %s.\n", 
     c->log, c->msg, 0 );
    return 1;

   } else if ( c->value_int > 2 * SLAP_MAX_WORKER_THREADS ) {
    snprintf( c->msg, sizeof( c->msg ),
     "warning, threads=%d larger than twice the default (2*%d=%d); YMMV",
    Debug(LDAP_DEBUG_ANY, "%s: %s.\n",
     c->log, c->msg, 0 );


After rebuilding the modified code, the slapd can not operate request and

I have tried another method: build the code with configuring --without--threads,
the newly bebuilt 

code can start but can not accpet request and return and segment fault error,
then the slapd crashes.

How to modify the code to eleminate limit of the minimum number of threads?

Thanks a lot!