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

olcDbConfig not correctly populating DB_CONFIG file

openldap 2.3.4
freebsd 5.4
db 4.3.28

I have just started testing with parts of the new ldif configuration in
slapd.d and have found (in my experience) that the olcDbConfig settings
aren't correctly populated into the DB_CONFIG file upon restart.

I start from scratch and create a DB_CONFIG file with the following:
set_cachesize 0 536870912 1
set_lg_regionmax 1048576
set_lg_bsize 2097152
set_lg_max 10485760
#only for database loading/reindexing w/ slapadd
#set_flags DB_TXN_NOSYNC

Then I start slapd and the slapd.d directory is populated.  I open
cn=config/olcDatabase={1}hdb.ldif and view it.  It shows the following.

olcDbConfig: {0}set_cachesize 0 536870912 1
olcDbConfig: {1}set_lg_regionmax 1048576
olcDbConfig: {2}set_lg_bsize 2097152
olcDbConfig: {3}set_lg_max 10485760
olcDbConfig: {4}set_flags DB_LOG_AUTOREMOVE
olcDbConfig: {5}#only for database loading/reindexing w/ slapadd
olcDbConfig: {6}#set_flags DB_TXN_NOSYNC
olcDbConfig: {7}#set_flags DB_TXN_NOT_DURABLE

If I then shutdown slapd, delete the DB_CONFIG file from
/var/db/openldap-data and restart slapd.  The DB_CONFIG file is recreated,
but the first entry of each line is ommitted.

So the file ends up looking like this:

0 536870912 1
for database loading/reindexing w/ slapadd

Debug shows this.  It does core, but I believe that is due to the
DB_CONFIG file being incorrect, so I don't think it will show anything
relevent.  Let me know if you want me to run gdb info on it.

slapd startup: initiated.
backend_startup_one: starting "cn=config"
backend_startup_one: starting "dc=mydomain,dc=net"
bdb_db_open: dc=mydomain,dc=net
bdb_db_open: DB_CONFIG for suffix dc=mydomain,dc=net has changed.
Performing database recovery to activate new settings.
bdb(dc=mydomain,dc=net): unrecognized name-value pair: 0
bdb_do_recovery: dbenv_open failed: Invalid argument (22)
bdb_db_open: db recovery failed.
backend_startup_one: bi_db_open failed! (-1)
slapd shutdown: initiated
====> bdb_cache_release_all
Assertion failed: (rw != NULL), function ldap_pvt_thread_rdwr_wlock, file
rdwr.c, line 271.
Abort trap (core dumped)


Dusty Doris