DB_PRIVATE

James Burns burns at attitudejim.com
Sat Dec 4 17:38:55 CET 2004


First. Very sorry about the email address mess I made.

Matthias Andree wrote:
> David Relson <relson at osagesoftware.com> writes:
> 
> 
>>>Berkeley DB library configured to support only DB_PRIVATE
>>>environments
>>
>>>bogofilter: DB_ENV->open, err: Invalid argument

>>As a first bit of info, what distro are you running and how did you load
>>DB-4.3.21 (from source, rpm, deb, ???)
> 


Fedora 2
I built DB-4.3.21.

../dist/configure
make
make install

No flags.
No errors on the build or install.


I installed bogofilter from the bogofilter-0.93.2-1.i586.rpm.
No errors here either.
rpm -Uvh bogofilter-0.93.2-1.i586.rpm


[root at dns1 spam]# uname -a
Linux dns1.attitudejim.com 2.6.9-1.6_FC2 #1 Thu Nov 18 22:02:27 EST 2004 
i586 i586 i386 GNU/Linux

[root at dns1 db_conf_log]# printenv | sort
BASH_ENV=/root/.bashrc
DISPLAY=localhost:10.0
G_BROKEN_FILENAMES=1
HISTCONTROL=ignorespace
HISTSIZE=1000
HOME=/root
HOSTNAME=dns1.attitudejim.com
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=root
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/root
MC_TMPDIR=/tmp/mc-root
OLDPWD=/home/burns
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
PWD=/home/burns/db_conf_log
SHELL=/bin/bash
SHLVL=2
SSH_CLIENT=::ffff:192.168.0.10 32774 22
SSH_CONNECTION=::ffff:192.168.0.10 32774 ::ffff:192.168.0.7 22
SSH_TTY=/dev/pts/0
TERM=xterm
USERNAME=root
USER=root
_=/usr/bin/printenv

I have the DB-4.3.21 config.log gziped.
Just not sure where to ftp it.
So I put a copy here,
http://files.attitudejim.com/jims_berkeley_4.3.21_config_log.gz

Thank you for your  time.
-jim


> 
> Did you configure a static compile? What did bogofilter's configure use
> for LIBDB? ("grep LIBDB src/Makefile" will tell you)
> 
> What *exact* machine do you run (try: uname -a)
> 
> Do you set LD_ASSUME_KERNEL in your environment (if running on Linux)?
> Try "printenv | sort"
> 
> How *exactly* have you compiled/installed DB-4.3.21?
> 
> Do you have its config.log still around? If so, upload it to the web
> site, an FTP server (please compress).
> 
> Same for bogofilter's config.log.
> 
> 
>>Looking at the source code (file datastore_db.c) we have
>>
>>   /*
>>    * Hint from Keith Bostic, SleepyCat support, 2004-11-29,
>>    * we can use the DB_PRIVATE flag, that rebuilds the database
>>    * environment in heap memory, so we don't need to remove it.
>>    */
>>
>>    e = env->open(env, directory, dbenv_defflags | DB_PRIVATE |
>>                  DB_CREATE | DB_RECOVER, 0664);    
>>    ...
> 
> 
> That's the exact opposite, and the only special case where bogofilter
> does not need a _shared_ environment (as we hold the global exclusive
> lock, run recovery to propagate unsynched changes from the log, and are
> removing the environment right away).
> 
> All other uses of bogofilter require a shared environment, i. e. one
> without DB_PRIVATE - and that doesn't work for Jim for some reason. This
> appears to be more common for DB 4.3 for some reason. Not sure what has
> changed WRT POSIX threads or mutex support.
> 
> Playing with the BDB mutex ./configure options may help.  If someone
> finds out, please let me know.
> 
> I have found this:
> http://svn.haxx.se/users/archive-2004-07/1717.shtml
> but haven't yet wrapped my mind fully around why these mutexes don't
> work with a static libpthreads and thereabouts.
> 



More information about the Bogofilter mailing list