Problems after a Debian testing bogofilter upgrade

David Relson relson at osagesoftware.com
Sat Oct 15 23:14:37 CEST 2005


On Sat, 15 Oct 2005 18:05:55 -0300
Martín Marqués wrote:

> El Sáb 15 Oct 2005 17:37, David Relson escribió:
> > 
> > Indeed those lines cause trouble -- big time!!!
> > 
> > [relson at osage src]$ cat test.cf
> > db_lk_max_locks 37000
> > db_lk_max_objects 37000
> 
> I remember having them in because of lots of lock files in .bogofilter/ 
> directory.
> 
> > [relson at osage src]$ bogofilter -c test.cf
> > Aborted (core dumped)
> > 
> > I expect to know why in a few minutes!
> 
> I would really want to know.
> 
> Thanks again.

A lot of effort went into allowing fine grained locking to allow
simultaneous reading and writing of wordlists.  One problem was that
the number of locks needs to increase as wordlist size increases.  An
effort was made to automate the resizing of the lock files.  Ultimately
this was determined to be too complex and not worth the effort.  The
code for this was removed back in June (with version 0.95.2).

Unfortunately, the options are still recognized in 0.96.2 and cause
bogofilter to abort when they're used.

Here's a patch that generates a message instead of aborting:

Index: bogoconfig.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/bogoconfig.c,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -d -r1.230 -r1.231
--- bogoconfig.c	29 Jun 2005 10:05:22 -0000	1.230
+++ bogoconfig.c	15 Oct 2005 20:50:23 -0000	1.231
@@ -715,7 +715,10 @@
 #ifndef	DISABLE_TRANSACTIONS
 	if (!dsm_options_bogofilter(option, name, val))
 #endif
-	    abort();
+	{
+	    fprintf(stderr, "Invalid option '%s'.\n", name);
+	    exit(EX_ERROR);
+	}
     }
 }
 

### and here's a patch that removes the offending options:

Index: longoptions.h
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/longoptions.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- longoptions.h	18 Jun 2005 16:36:09 -0000	1.18
+++ longoptions.h	15 Oct 2005 21:02:44 -0000	1.19
@@ -28,8 +28,6 @@
     O_BLOCK_ON_SUBNETS = 1000,
     O_CHARSET_DEFAULT,
     O_CONFIG_FILE,
-    O_DB_MAX_OBJECTS,
-    O_DB_MAX_LOCKS,
     O_DB_CHECKPOINT,
     O_DB_LIST_LOGFILES,
     O_DB_PRINT_LEAFPAGE_COUNT,
@@ -102,8 +100,6 @@
 #ifdef	HAVE_DECL_DB_CREATE
  #undef lo1
  #define lo1 \
-    { "db-lk-max-locks",		R, 0, O_DB_MAX_LOCKS }, \
-    { "db-lk-max-objects",		R, 0, O_DB_MAX_OBJECTS }, \
     { "db-log-autoremove",		R, 0, O_DB_LOG_AUTOREMOVE },
  #ifdef	FUTURE_DB_OPTIONS
   #undef lo2

Regards,

David

P.S.  I'm glad you encountered this.  Bogofilter is nearing the 1.0
release and it's good to fix things like this before that happens!




More information about the Bogofilter mailing list