bogofilter over NFS

Matthias Andree matthias.andree at gmx.de
Fri Feb 7 12:35:45 CET 2003


On Thu, 06 Feb 2003, Piotr KUCHARSKI wrote:

> That is why it worked under Sol8 and does not at me, Sol2.6, hm.
> I'll perhaps try to reuse old 0.7.4 locking code for a while.

OK, can you give more detail what exactly fails, like running sotruss or
truss on the original bogofilter code that loops unterminatedly? I'd
like to see what BerkeleyDB returns as error and possibly handle it by
retrying without mmap.

What you can try and what should help is: tell BerkeleyDB not to mmap()
the file. Edit datastore_db.c, and find the location show below and
insert the line

opt_flags |= DB_NOMMAP;

before the /* open data base */ comment, as shown below near line #128;
this DB_NOMMAP is not present in the original file.  Then recompile and
reinstall bogofilter. (make ; su -c "make install-strip")

Note the line numbers are not present in the file, they are shown here
as a convenience for you to easier find things. Line number as per
bogofilter-0.10.2.

   122      /* create DB handle */
   123      if ((ret = db_create (&(handle->dbp), NULL, 0)) != 0) {
   124          print_error(__FILE__, __LINE__, "(db) create, err: %d, %s",
   125                  ret, db_strerror(ret));
   126          goto open_err;
   127      }
   128  
            opt_flags |= DB_NOMMAP;
   129      /* open data base */
   130      if ((ret = DB_OPEN(handle->dbp, db_file, NULL, DB_BTREE, opt_flags, 
0664)) != 0 &&
   131              (ret = DB_OPEN(handle->dbp, db_file, NULL, DB_BTREE, opt_fla
gs |  DB_CREATE | DB_EXCL, 0664)) != 0) {
   132          print_error(__FILE__, __LINE__, "(db) open( %s ), err: %d, %s",
   133                  db_file, ret, db_strerror(ret));
   134          goto open_err;
   135      }
   136  
   137      if (DEBUG_DATABASE(1)) {
   138        fprintf(dbgout, "db_open( %s, %s, %d )\n", name, db_file, open_mod
e);
   139      }
   140  





More information about the Bogofilter mailing list