Issue 295 - openldap on Linux/alpha
Summary: openldap on Linux/alpha
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-09-18 01:53 UTC by jeffgus@zimage.com
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ben Collins 1999-09-17 23:18:01 UTC
On Sat, Sep 18, 1999 at 03:10:35AM +0000, Kurt@OpenLDAP.org wrote:
> At 03:03 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
> >> I believe this is caused by using an incompatible version of
> >> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
> >> (available from http://www.sleepycat.com/).
> >> 
> >
> >	Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
> >the Intel version.  It's only when I tried to run it on the Alpha did I
> >have this problem.  I assumed the db versions would be the same since I'm
> >running RH6.0 on both Intel and Alpha.
> 
> Or they might just fail in different ways...  If 2.7.5 (or later)
> should work.  If not, we'll have to dig a little.

More than likely, both of these systems are using the db2 included with glibc
2.1.x. But the problem is that db2 can also be installed with the glibc ones.
Can you just check the ldd output on both slapd's and send those?

Ben
Comment 1 jeffgus@zimage.com 1999-09-18 01:53:55 UTC
Full_Name: Jeff Gustafson
Version: 1.2.7 and CVS
OS: Linux/alpha
URL: 
Submission from: (NULL) (216.86.199.4)


I get this message when I try to run OpenLDAP version 1.2.6, 1.2.7 and CVS
version on
Linux/Alpha:

Sep 17 18:48:37 alpha slapd[14875]: ldbm_db_errcall(): ==> illegal flag
specified to db_appinit
Sep 17 18:48:37 alpha slapd[14875]: ldbm_initialize(): FATAL error in
db_appinit() : Invalid argument  

Comment 2 Kurt Zeilenga 1999-09-18 02:50:26 UTC
At 01:53 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
>Full_Name: Jeff Gustafson
>Version: 1.2.7 and CVS
>OS: Linux/alpha
>URL: 
>Submission from: (NULL) (216.86.199.4)
>
>
>I get this message when I try to run OpenLDAP version 1.2.6, 1.2.7 and CVS
>version on
>Linux/Alpha:
>
>Sep 17 18:48:37 alpha slapd[14875]: ldbm_db_errcall(): ==> illegal flag
>specified to db_appinit
>Sep 17 18:48:37 alpha slapd[14875]: ldbm_initialize(): FATAL error in
>db_appinit() : Invalid argument  

I believe this is caused by using an incompatible version of
BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
(available from http://www.sleepycat.com/).
Comment 3 jeffgus@zimage.com 1999-09-18 03:03:07 UTC
On Fri, 17 Sep 1999, Kurt D. Zeilenga wrote:

> At 01:53 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
> >Full_Name: Jeff Gustafson
> >Version: 1.2.7 and CVS
> >OS: Linux/alpha
> >URL: 
> >Submission from: (NULL) (216.86.199.4)
> >
> >
> >I get this message when I try to run OpenLDAP version 1.2.6, 1.2.7 and CVS
> >version on
> >Linux/Alpha:
> >
> >Sep 17 18:48:37 alpha slapd[14875]: ldbm_db_errcall(): ==> illegal flag
> >specified to db_appinit
> >Sep 17 18:48:37 alpha slapd[14875]: ldbm_initialize(): FATAL error in
> >db_appinit() : Invalid argument  
> 
> I believe this is caused by using an incompatible version of
> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
> (available from http://www.sleepycat.com/).
> 

	Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
the Intel version.  It's only when I tried to run it on the Alpha did I
have this problem.  I assumed the db versions would be the same since I'm
running RH6.0 on both Intel and Alpha.

				...Jeff

Comment 4 Kurt Zeilenga 1999-09-18 03:07:42 UTC
At 03:03 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
>> I believe this is caused by using an incompatible version of
>> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
>> (available from http://www.sleepycat.com/).
>> 
>
>	Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
>the Intel version.  It's only when I tried to run it on the Alpha did I
>have this problem.  I assumed the db versions would be the same since I'm
>running RH6.0 on both Intel and Alpha.

Or they might just fail in different ways...  If 2.7.5 (or later)
should work.  If not, we'll have to dig a little.

Kurt
Comment 5 Kurt Zeilenga 1999-09-18 03:19:31 UTC
Ben Collins wrote:
> 
> On Sat, Sep 18, 1999 at 03:10:35AM +0000, Kurt@OpenLDAP.org wrote:
> > At 03:03 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
> > >> I believe this is caused by using an incompatible version of
> > >> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
> > >> (available from http://www.sleepycat.com/).
> > >>
> > >
> > >     Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
> > >the Intel version.  It's only when I tried to run it on the Alpha did I
> > >have this problem.  I assumed the db versions would be the same since I'm
> > >running RH6.0 on both Intel and Alpha.
> >
> > Or they might just fail in different ways...  If 2.7.5 (or later)
> > should work.  If not, we'll have to dig a little.
> 
> More than likely, both of these systems are using the db2 included with glibc
> 2.1.x. But the problem is that db2 can also be installed with the glibc ones.
> Can you just check the ldd output on both slapd's and send those?

And grep for DB_VERSION_STRING in any <db.h> in your include path...
Comment 6 jeffgus@zimage.com 1999-09-18 04:59:37 UTC
On Fri, 17 Sep 1999, Kurt D. Zeilenga wrote:

> At 03:03 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
> >> I believe this is caused by using an incompatible version of
> >> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
> >> (available from http://www.sleepycat.com/).
> >> 
> >
> >	Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
> >the Intel version.  It's only when I tried to run it on the Alpha did I
> >have this problem.  I assumed the db versions would be the same since I'm
> >running RH6.0 on both Intel and Alpha.
> 
> Or they might just fail in different ways...  If 2.7.5 (or later)
> should work.  If not, we'll have to dig a little.
> 
> Kurt
> 


	Okay I verified that RH6.0 uses the libdb that comes with glibc.
The version happens to be 2.4.14.  I didn't see anywhere in the FAQ on how
to get OpenLDAP to compile against a different version of DB on a glibc
system.  Any tricks?  Some sort of --with-db=/usr/local/BerkleyDB??

				...Jeff

Comment 7 Kurt Zeilenga 1999-09-18 08:05:34 UTC
jeffgus@zimage.com wrote:
> 
> On Fri, 17 Sep 1999, Kurt D. Zeilenga wrote:
> 
> > At 03:03 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
> > >> I believe this is caused by using an incompatible version of
> > >> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
> > >> (available from http://www.sleepycat.com/).
> > >>
> > >
> > >     Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
> > >the Intel version.  It's only when I tried to run it on the Alpha did I
> > >have this problem.  I assumed the db versions would be the same since I'm
> > >running RH6.0 on both Intel and Alpha.
> >
> > Or they might just fail in different ways...  If 2.7.5 (or later)
> > should work.  If not, we'll have to dig a little.
> >
> > Kurt
> >
> 
>         Okay I verified that RH6.0 uses the libdb that comes with glibc.
> The version happens to be 2.4.14.  I didn't see anywhere in the FAQ on how
> to get OpenLDAP to compile against a different version of DB on a glibc
> system.  Any tricks?  Some sort of --with-db=/usr/local/BerkleyDB??
> 
>                                 ...Jeff
Use CPPFLAGS/LDFLAGS.  See INSTALL and http://www.openldap.org/faq/index.cgi?file=43
Comment 8 jeffgus@zimage.com 1999-09-18 09:32:38 UTC
On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:

> jeffgus@zimage.com wrote:
> > 
> > On Fri, 17 Sep 1999, Kurt D. Zeilenga wrote:
> > 
> > > At 03:03 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
> > > >> I believe this is caused by using an incompatible version of
> > > >> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
> > > >> (available from http://www.sleepycat.com/).
> > > >>
> > > >
> > > >     Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
> > > >the Intel version.  It's only when I tried to run it on the Alpha did I
> > > >have this problem.  I assumed the db versions would be the same since I'm
> > > >running RH6.0 on both Intel and Alpha.
> > >
> > > Or they might just fail in different ways...  If 2.7.5 (or later)
> > > should work.  If not, we'll have to dig a little.
> > >
> > > Kurt
> > >
> > 
> >         Okay I verified that RH6.0 uses the libdb that comes with glibc.
> > The version happens to be 2.4.14.  I didn't see anywhere in the FAQ on how
> > to get OpenLDAP to compile against a different version of DB on a glibc
> > system.  Any tricks?  Some sort of --with-db=/usr/local/BerkleyDB??
> > 
> >                                 ...Jeff
> Use CPPFLAGS/LDFLAGS.  See INSTALL and http://www.openldap.org/faq/index.cgi?file=43
> 

	I tried:

CPPFLAGS=-I/usr/local/BerkeleyDB/include \
LDFLAGS=-L/usr/local/BerkeleyDB/lib \

Same error:
slapd[22000]: ldbm_db_errcall(): ==> illegal flag specified to db_appinit
slapd[22000]: ldbm_initialize(): FATAL error in db_appinit() : Invalid
argument  

	The LDFLAGS should take priority, correct?

				...Jeff

Comment 9 Ben Collins 1999-09-18 12:28:30 UTC
On Sat, Sep 18, 1999 at 09:32:40AM +0000, jeffgus@zimage.com wrote:
> On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:
> 
> > jeffgus@zimage.com wrote:
> > > 
> > > On Fri, 17 Sep 1999, Kurt D. Zeilenga wrote:
> > > 
> > > > At 03:03 AM 9/18/99 GMT, jeffgus@zimage.com wrote:
> > > > >> I believe this is caused by using an incompatible version of
> > > > >> BerkeleyDB.  OpenLDAP requires BerkeleyDB 2.7.5 or later
> > > > >> (available from http://www.sleepycat.com/).
> > > > >>
> > > > >
> > > > >     Hmmm.  I'll try it.  I'm using RH6.0 and OpenLDAP works fine on
> > > > >the Intel version.  It's only when I tried to run it on the Alpha did I
> > > > >have this problem.  I assumed the db versions would be the same since I'm
> > > > >running RH6.0 on both Intel and Alpha.
> > > >
> > > > Or they might just fail in different ways...  If 2.7.5 (or later)
> > > > should work.  If not, we'll have to dig a little.
> > > >
> > > > Kurt
> > > >
> > > 
> > >         Okay I verified that RH6.0 uses the libdb that comes with glibc.
> > > The version happens to be 2.4.14.  I didn't see anywhere in the FAQ on how
> > > to get OpenLDAP to compile against a different version of DB on a glibc
> > > system.  Any tricks?  Some sort of --with-db=/usr/local/BerkleyDB??
> > > 
> > >                                 ...Jeff
> > Use CPPFLAGS/LDFLAGS.  See INSTALL and http://www.openldap.org/faq/index.cgi?file=43
> > 
> 
> 	I tried:
> 
> CPPFLAGS=-I/usr/local/BerkeleyDB/include \
> LDFLAGS=-L/usr/local/BerkeleyDB/lib \
> 
> Same error:
> slapd[22000]: ldbm_db_errcall(): ==> illegal flag specified to db_appinit
> slapd[22000]: ldbm_initialize(): FATAL error in db_appinit() : Invalid
> argument  
> 
> 	The LDFLAGS should take priority, correct?

Did you do this for the configure? Make sure you start with a clean source tree and
run this:

CPPFLAGS=-I/usr/local/BerkeleyDB/include LDFLAGS=-L/usr/local/BerkeleyDB/lib ./configure

Just as specified above.

Ben
Comment 10 jeffgus@zimage.com 1999-09-18 19:16:08 UTC
On Sat, 18 Sep 1999, Ben Collins wrote:

> > > >         Okay I verified that RH6.0 uses the libdb that comes with glibc.
> > > > The version happens to be 2.4.14.  I didn't see anywhere in the FAQ on how
> > > > to get OpenLDAP to compile against a different version of DB on a glibc
> > > > system.  Any tricks?  Some sort of --with-db=/usr/local/BerkleyDB??
> > > > 
> > > >                                 ...Jeff
> > > Use CPPFLAGS/LDFLAGS.  See INSTALL and http://www.openldap.org/faq/index.cgi?file=43
> > > 
> > 
> > 	I tried:
> > 
> > CPPFLAGS=-I/usr/local/BerkeleyDB/include \
> > LDFLAGS=-L/usr/local/BerkeleyDB/lib \
> > 
> > Same error:
> > slapd[22000]: ldbm_db_errcall(): ==> illegal flag specified to db_appinit
> > slapd[22000]: ldbm_initialize(): FATAL error in db_appinit() : Invalid
> > argument  
> > 
> > 	The LDFLAGS should take priority, correct?
> 
> Did you do this for the configure? Make sure you start with a clean source tree and
> run this:
> 
> CPPFLAGS=-I/usr/local/BerkeleyDB/include LDFLAGS=-L/usr/local/BerkeleyDB/lib ./configure
> 
> Just as specified above.

	Yup.  I added it to the RPM .spec file.  I saw the gcc was using
them during build time.

			...Jeff

Comment 11 Kurt Zeilenga 1999-09-18 20:07:50 UTC
Apply this patch and let me know if things improve...

http://www.openldap.org/devel/cvsweb.cgi/libraries/libldbm/ldbm.c.diff?r1=1.3.2.3.2.8&r2=1.3.2.3.2.9


Comment 12 jeffgus@zimage.com 1999-09-18 20:54:54 UTC
On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:

> Apply this patch and let me know if things improve...
> 
> http://www.openldap.org/devel/cvsweb.cgi/libraries/libldbm/ldbm.c.diff?r1=1.3.2.3.2.8&r2=1.3.2.3.2.9
> 
> 

	I tried that originally.  I just tried it again with the LDFLAG
stuff and still no go.

				...Jeff

Comment 13 Kurt Zeilenga 1999-09-18 21:09:14 UTC
jeffgus@zimage.com wrote:
> 
> On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:
> 
> > Apply this patch and let me know if things improve...
> >
> > http://www.openldap.org/devel/cvsweb.cgi/libraries/libldbm/ldbm.c.diff?r1=1.3.2.3.2.8&r2=1.3.2.3.2.9
> >
> >
> 
>         I tried that originally.  I just tried it again with the LDFLAG
> stuff and still no go.
> 
>                                 ...Jeff

Only thing I can suggest is to use ldd to verify that slapd is linked against
the appropriate dynamic library.  You might even add a call db_version()
to verify you got the right stuff.

	fprintf(stderr, "db.h:\t%s\n-ldb:\t%s\n",
		DB_VERSION_STRING, db_version(NULL,NULL,NULL) );

Kurt
Comment 14 jeffgus@zimage.com 1999-09-19 04:37:44 UTC
On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:

> >         I tried that originally.  I just tried it again with the LDFLAG
> > stuff and still no go.
> > 
> >                                 ...Jeff
> 
> Only thing I can suggest is to use ldd to verify that slapd is linked against
> the appropriate dynamic library.  You might even add a call db_version()
> to verify you got the right stuff.
> 
> 	fprintf(stderr, "db.h:\t%s\n-ldb:\t%s\n",
> 		DB_VERSION_STRING, db_version(NULL,NULL,NULL) );
> 
> Kurt
> 

	It looks like it did pick up the correct library:

Sep 18 21:36:31 alpha slapd: db.h:^ISleepycat Software: Berkeley DB 2.7.7:
(08/20/99)
Sep 18 21:36:31 alpha slapd[16138]: ldbm_db_errcall(): ==> illegal flag
specified to db_appinit
Sep 18 21:36:31 alpha slapd[16138]: ldbm_initialize(): FATAL error in
db_appinit() : Invalid argument  
Sep 18 21:36:31 alpha slapd: -ldb:^ISleepycat Software: Berkeley DB 2.7.7:
(08/20/99)



Comment 15 Kurt Zeilenga 1999-09-19 05:02:17 UTC
jeffgus@zimage.com wrote:
> 
> On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:
> 
> > >         I tried that originally.  I just tried it again with the LDFLAG
> > > stuff and still no go.
> > >
> > >                                 ...Jeff
> >
> > Only thing I can suggest is to use ldd to verify that slapd is linked against
> > the appropriate dynamic library.  You might even add a call db_version()
> > to verify you got the right stuff.
> >
> >       fprintf(stderr, "db.h:\t%s\n-ldb:\t%s\n",
> >               DB_VERSION_STRING, db_version(NULL,NULL,NULL) );
> >
> > Kurt
> >
> 
>         It looks like it did pick up the correct library:
> 
> Sep 18 21:36:31 alpha slapd: db.h:^ISleepycat Software: Berkeley DB 2.7.7:
> (08/20/99)
> Sep 18 21:36:31 alpha slapd[16138]: ldbm_db_errcall(): ==> illegal flag
> specified to db_appinit
> Sep 18 21:36:31 alpha slapd[16138]: ldbm_initialize(): FATAL error in
> db_appinit() : Invalid argument
> Sep 18 21:36:31 alpha slapd: -ldb:^ISleepycat Software: Berkeley DB 2.7.7:
> (08/20/99)

db_appinit(3) ERRORS
EINVAL:	The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.

No spinlocks under Linux/alpha?

Kurt
Comment 16 Kurt Zeilenga 1999-09-19 05:30:20 UTC
>db_appinit(3) ERRORS
>EINVAL:	The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.
>
>No spinlocks under Linux/alpha?

Looks like BerkeleyDB does not support GCC spinlocks under
Linux/alpha (or other non-x86 architectures).

Unless you want to write a little assembler code (or modify ldbm.c
to support non-DB_THREAD BerkeleyDB2 use), you'll have to use
GDBM (--with-ldbm-api=gdbm).

Thanks for sticky through this...

	Kurt
Comment 17 jeffgus@zimage.com 1999-09-19 06:31:38 UTC
On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:

> 
> >db_appinit(3) ERRORS
> >EINVAL:	The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.
> >
> >No spinlocks under Linux/alpha?
> 
> Looks like BerkeleyDB does not support GCC spinlocks under
> Linux/alpha (or other non-x86 architectures).
> 
> Unless you want to write a little assembler code (or modify ldbm.c
> to support non-DB_THREAD BerkeleyDB2 use), you'll have to use
> GDBM (--with-ldbm-api=gdbm).

	Okay... that works.  I haven't tried to populate anything yet, but
the daemon is running now.  How much is my performance going to be
affected?

			...Jeff


Comment 18 Ben Collins 1999-09-19 09:21:43 UTC
On Sun, Sep 19, 1999 at 04:37:46AM +0000, jeffgus@zimage.com wrote:
> On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:
> 
> > >         I tried that originally.  I just tried it again with the LDFLAG
> > > stuff and still no go.
> > > 
> > >                                 ...Jeff
> > 
> > Only thing I can suggest is to use ldd to verify that slapd is linked against
> > the appropriate dynamic library.  You might even add a call db_version()
> > to verify you got the right stuff.
> > 
> > 	fprintf(stderr, "db.h:\t%s\n-ldb:\t%s\n",
> > 		DB_VERSION_STRING, db_version(NULL,NULL,NULL) );
> > 
> > Kurt
> > 
> 
> 	It looks like it did pick up the correct library:
> 
> Sep 18 21:36:31 alpha slapd: db.h:^ISleepycat Software: Berkeley DB 2.7.7:
> (08/20/99)
> Sep 18 21:36:31 alpha slapd[16138]: ldbm_db_errcall(): ==> illegal flag
> specified to db_appinit
> Sep 18 21:36:31 alpha slapd[16138]: ldbm_initialize(): FATAL error in
> db_appinit() : Invalid argument  
> Sep 18 21:36:31 alpha slapd: -ldb:^ISleepycat Software: Berkeley DB 2.7.7:
> (08/20/99)

But when running it, it's probably using the glibc db lib. Try adding
LD_LIBARY_PATH=/path/to/new/db before exucuting slapd.

Ben
Comment 19 Kurt Zeilenga 1999-09-19 19:15:46 UTC
jeffgus@zimage.com wrote:
> On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:
> > >db_appinit(3) ERRORS
> > >EINVAL:      The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.
> > >
> > >No spinlocks under Linux/alpha?
> >
> > Looks like BerkeleyDB does not support GCC spinlocks under
> > Linux/alpha (or other non-x86 architectures).
> >
> > Unless you want to write a little assembler code (or modify ldbm.c
> > to support non-DB_THREAD BerkeleyDB2 use), you'll have to use
> > GDBM (--with-ldbm-api=gdbm).
> 
>         Okay... that works.  I haven't tried to populate anything yet, but
> the daemon is running now.  How much is my performance going to be
> affected?

GDBM and BerkeleyDB (without DB_THREAD support) should yield about the same
performance for small directories.

Kurt
Comment 20 Andrew Kemp 1999-09-20 04:31:37 UTC
On 19/09/99 at 05:33:24 +0000, Kurt@OpenLDAP.org spoke thus :

Greetings Kurt et al,

> >db_appinit(3) ERRORS
> >EINVAL:	The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.
> >
> >No spinlocks under Linux/alpha?
> 
> Looks like BerkeleyDB does not support GCC spinlocks under
> Linux/alpha (or other non-x86 architectures).

This is not specific to Linux - if you are using Digital Unix 4.x
on an Alpha (as we are) then you also have the problem with spinlocks.
This appears to be what is also causing me problems with installing any
version of OpenLDAP since DB2 became mandatory.

> Unless you want to write a little assembler code (or modify ldbm.c
> to support non-DB_THREAD BerkeleyDB2 use), you'll have to use
> GDBM (--with-ldbm-api=gdbm).
> 

I will try this and see if this works for us.
Thanks.

Regards,

Andrew Kemp

-- 
Unix,WWW,Proxy,News,DNS,LDAP,... Administrator	Phone	: 61 +3 9214-8252
Information Technology Services			Fax	: 61 +3 9214-8944
Swinburne University of Technology		E-Mail: andrew@swin.EDU.AU
Hawthorn, Victoria, Australia 3122 	URL: http://opax.swin.edu.au/andrew
Comment 21 Andrew Kemp 1999-09-20 04:32:37 UTC
On 19/09/99 at 19:18:56 +0000, Kurt@OpenLDAP.org spoke thus :
> jeffgus@zimage.com wrote:
> > On Sat, 18 Sep 1999, Kurt D. Zeilenga wrote:
> > > >db_appinit(3) ERRORS
> > > >EINVAL:      The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.
> > > >
> > > >No spinlocks under Linux/alpha?
> > >
> > > Looks like BerkeleyDB does not support GCC spinlocks under
> > > Linux/alpha (or other non-x86 architectures).
> > >
> > > Unless you want to write a little assembler code (or modify ldbm.c
> > > to support non-DB_THREAD BerkeleyDB2 use), you'll have to use
> > > GDBM (--with-ldbm-api=gdbm).
> > 
> >         Okay... that works.  I haven't tried to populate anything yet, but
> > the daemon is running now.  How much is my performance going to be
> > affected?
> 
> GDBM and BerkeleyDB (without DB_THREAD support) should yield about the same
> performance for small directories.

And for large directories ? We have at least 50K+ individuals in
our directory at present.

Thanks.

Regards,

Andrew Kemp

-- 
Unix,WWW,Proxy,News,DNS,LDAP,... Administrator	Phone	: 61 +3 9214-8252
Information Technology Services			Fax	: 61 +3 9214-8944
Swinburne University of Technology		E-Mail: andrew@swin.EDU.AU
Hawthorn, Victoria, Australia 3122 	URL: http://opax.swin.edu.au/andrew
Comment 22 Kurt Zeilenga 1999-09-20 05:07:25 UTC
Andrew Kemp wrote:
> On 19/09/99 at 05:33:24 +0000, Kurt@OpenLDAP.org spoke thus :
> > >db_appinit(3) ERRORS
> > >EINVAL:      The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.
> > >
> > >No spinlocks under Linux/alpha?
> >
> > Looks like BerkeleyDB does not support GCC spinlocks under
> > Linux/alpha (or other non-x86 architectures).
> 
> This is not specific to Linux - if you are using Digital Unix 4.x
> on an Alpha (as we are) then you also have the problem with spinlocks.

BerkeleyDB appears to only support DB_THREAD under a fairly limited
set of platforms (as the code is written in assembler).
Looks like we should implement a configure test to see if
DB_THREAD is currently supported and if not fall back to
LDBM level locking (as we do for GDBM and BDB1).

> This appears to be what is also causing me problems with installing any
> version of OpenLDAP since DB2 became mandatory.

BerkeleyDB is not mandatory.  Either BerkeleyDB or GDBM are required for
LDBM databases.  In either case, only recent versions are supported.
BerkeleyDB 2.7.5 (or better) or GDBM 1.8.

> > GDBM and BerkeleyDB (without DB_THREAD support) should yield about the same
> > performance for small directories.
> 
> And for large directories ? We have at least 50K+ individuals in
> our directory at present.

Well, I believe BerkeleyDB can be significantly faster on cache and disk
operations.  However, if slapd is setup with large LDBM caching, you may
never notice the difference.

I would consider it wise for developers to invest a little time implementing
Berkeley DB_THREAD support for their platform so that you can take full
advantage of the BDB2-specific backend when it becomes available.
Comment 23 Kurt Zeilenga 1999-09-24 00:48:30 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 24 Kurt Zeilenga 1999-12-10 17:26:27 UTC
changed notes
changed state Test to Closed
Comment 25 OpenLDAP project 2014-08-01 21:06:53 UTC
Determined DB_THREAD not supported under Linux/Alpha.
Need to modify LDBM code to avoid DB_THREAD if not available.
Need detection code.  Committed to devel.
released with 1.2.8