database creation problems

David Relson relson at osagesoftware.com
Mon Dec 30 21:05:13 CET 2002


Hey all you DB3 experts, I've got a problem for you to solve.

As part of my bogofilter testing, I periodically create a brand new 
directory and start populating goodlist.db and spamlist.db in it.  Some 
days it works, some days it doesn't work.  Below is a session where I make 
a directory, but bogofilter can't initialize the wordlists.  Running with 
gdb, db_open() in datastore_db.c calls db_create(), which returns a 0, then 
calls db->open() which return a 2.

This failure mode will persist for a while (minutes? hours?), go away for a 
while, return, go away, etc, etc, etc.  Has anybody else encountered 
this?  Does anybody know how to cure the problem?

Interestingly, although bogofilter can't create a new database, bogoutil 
has no trouble.  Here's a transcript:

### create new directory

[relson at osage tst]$ mkdir test.d

### demonstrate bogofilter failing with "-n" and "-s"

[relson at osage tst]$ bogofilter -f -C -d test.d -n < /dev/null
bogofilter: (db) open( test.d/goodlist.db ), err: 2, No such file or directory
bogofilter: Cannot initialize database good.

[relson at osage tst]$ bogofilter -f -C -d test.d -s < /dev/null
bogofilter: (db) open( test.d/goodlist.db ), err: 2, No such file or directory
bogofilter: Cannot initialize database good.

### show that no databases were created

[relson at osage tst]$ ls -l test.d
total 0

### demonstrate bogoutil  succeeding

[relson at osage tst]$ bogoutil -l test.d/spamlist.db < /dev/null
[relson at osage tst]$ bogoutil -l test.d/goodlist.db < /dev/null

### show that bogoutil created two databases

[relson at osage tst]$ ls -l test.d
total 16
-rw-r--r--    1 relson   relson       8192 Dec 30 14:42 goodlist.db
-rw-r--r--    1 relson   relson       8192 Dec 30 14:41 spamlist.db





More information about the bogofilter-dev mailing list