Bogofilter locks too much

Karl O. Pinc kop at meme.com
Wed Jan 5 00:01:42 CET 2005


Thanks much for the quick reply!

On 01/04/2005 03:52:28 PM, Matthias Andree wrote:
> "Karl O. Pinc" <kop at meme.com> writes:
> 
> > kop at mofo:~$ bogofilter -V
> > bogofilter version 0.93.3.1
> >     Database: Sleepycat Software: Berkeley DB 4.3.21: (December  9,
> 
> > 2004)
> >
> > Debian Sarge
> >
> > I've a /etc/bogofilter.cf with
> >
> > db_lk_max_locks=65000
> > db_lk_max_objects=65000
> >
> > and I still keep getting messages like
> >
> > (temporary failure. Command output: Lock table is out of available
> > object entries bogofilter: (db) DB->get(TXN=134700544,  'Mio' ),
> err:
> > Cannot allocate memory procmail: Program failure (3) of

> Karl,
> 
> it appears you have found a bug in bogofilter.
> 
> I know two ways to work around this;
> either one alone is sufficient to fix your problem.
> 
> (1) run: bogoutil --remove-environment ~/.bogofilter

Would that be --db-remove-environment?  (I'll skip this
choice for fear of doing something to my database, although
it probably already should be rebuilt as some spam has
gotten mis-classified due to this error.)

> 
> (2) remove the two lines you mentioned above from /etc/bogofilter.cf
> and
>     create instead a ~/.bogofilter/DB_CONFIG file with lines like
> these
>     (no spaces at the beginning of the lines):
> 
>     set_lk_max_locks 65000
>     set_lk_max_objects 65000

I did this and it worked.  I first tried 16384, but had to up it
to keep from getting the error message.  (65000 sure seems an
awful lot of locks.)

Thanks.

FYI, your FAQ entry on DB_CONFIG does not say where the file should go.

Also, it's not clear what the default config values are.  Are those
the values commented out in /etc/bogofilter.cf?  If so then
max_locks/max_objects is not 1024 in that file.  FWIW, I like what
postfix does.  You can ask it for all it's config values, either
current as running or the defaults.  That way it's easy to see
how the config has been altered from the default.

> bogoutil --recover does not pass down the right environment size but
> uses 1024 locks and objects instead, same for automatic recovery.
> Ouch!
> 
> > Something's not right if I have to go to a 64bit integer worth of
> > locks.
> 
> You haven't even exhausted 16 bits (0...65535) :-)

Oops.  All those bits.  Makes my head sore.  ;-)

> Hope that helps for the nonce.  bogoutil bugfix coming up later.

Yes, thanks.  Working now.

Should I do something (bogoutil --db-remove-environment ~/.bogofilter/  ?)
to clean up the ~/.bogofilter directory and remove all those
files or is that normal?

> Please accept our apologies for the inconvenience!

Thanks for the quick reply.  I was getting on toward panic tho
for fear of having to read my email without a spam filter,
yesterday when I had to go digging into the manuals
and tweaking config files
to get bogofilter to train.  (I upgraded my os, including
moving from bogofilter 0.15.3.)

FYI, that big password file email that was choking got incorrectly  
classified as spam.  This is a little wierd as I've gotten similar  
mails in the past from the same person and have saved them in my
ham training set, which I used to train this time.

I probably should train all over again now that this is fixed..

Karl <kop at meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein





More information about the Bogofilter mailing list