[bas at debian.org: bogofilter bug]

Clint Adams schizo at debian.org
Sun Dec 14 21:10:18 CET 2003


Bas tried to send this to bogofilter-dev, but, of course, the
list's poster policy bounced his message, so I'm forwarding it for him.

The problem is that when 3.2.9's stat is called with
flags==DB_CACHED_COUNTS, the code where the pagesize is set is
skipped over by a 'goto done;'.  I'm not sure if this is a
documentation bug or a software bug, and I don't know
how other 3.x versions behave.

----- Forwarded message from Bas Zoetekouw <bas at debian.org> -----

Hi. This is the qmail-send program at lists.aotto.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<bogofilter-dev at lists.aotto.com>:
Sorry, only subscribers may post. If you are a subscriber, please forward this message to bogofilter-dev-owner at aotto.com to get your new address included (#5.7.2)

--- Below this line is a copy of the message.

Return-Path: <bas+matilda at o2w.nl>
Received: (qmail 26059 invoked from network); 14 Dec 2003 19:17:43 -0000
Received: from localhost (HELO mail.aotto.com) (127.0.0.1)
  by 127.0.0.1 with SMTP; 14 Dec 2003 19:17:43 -0000
Received: from boefje.phys.uu.nl (boefje.phys.uu.nl [131.211.32.64])
	by mail.aotto.com (Postfix) with ESMTP id B9FB010D4A
	for <bogofilter-dev at aotto.com>; Sun, 14 Dec 2003 11:17:41 -0800 (PST)
Received: from localhost (localhost.phys.uu.nl [127.0.0.1])
	by boefje.phys.uu.nl (Postfix) with ESMTP
	id 65A782E075; Sun, 14 Dec 2003 20:17:24 +0100 (CET)
Received: from boefje.phys.uu.nl ([127.0.0.1])
 by localhost (boefje.phys.uu.nl [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 08271-01; Sun, 14 Dec 2003 20:17:24 +0100 (CET)
Received: from matilda.phys.uu.nl (matilda.phys.uu.nl [131.211.36.104])
	by boefje.phys.uu.nl (Postfix) with ESMTP
	id C8C272E050; Sun, 14 Dec 2003 20:17:19 +0100 (CET)
Received: from bas by matilda.phys.uu.nl with local (Exim 3.36 #1 (Debian))
	id 1AVbjv-0002y6-00; Sun, 14 Dec 2003 20:17:15 +0100
Date: Sun, 14 Dec 2003 20:17:15 +0100
From: Bas Zoetekouw <bas at debian.org>
To: bogofilter-dev at aotto.com
Subject: floating point exception
Message-ID: <20031214191715.GA11357 at matilda.phys.uu.nl>
Reply-To: Bas Zoetekouw <bas at debian.org>, bogofilter-dev at aotto.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: Linux matilda 2.6.0-test11
X-Loop: Bas Zoetekouw
User-Agent: Mutt/1.5.4i
Sender: Bas Zoetekouw <bas+matilda at o2w.nl>

[please Cc me, I'm not subscribed]

Hi guys!

I've been happily using bogofilter for the last few months and it works
great to tag my spam.  Thanks for creating such a great program!

However, since I upgraded to 0.15.10 last friday, bogofilter started
crashing with an FPE (errorcode -8), but only when called from procmail.
Some further investigation showed the FPE to occur in
check_fsize_limit() in datastore_db.c and that is was actually a
division by zero error caused by pagesize being zero.

The bug was exposed when bogofilter was called from procmail, because
procmail apparently sets an rlimit on fsize.  When called form the
shell, check_fsize_limit() bailed out before doing the division by zero.

Anyhow, pagesize being zero is of course weird.  I suspected my database
being corrupted or something, and therefore I rebuilt it from scratch.
Bogofilter still kept crashing however.  Also, db3_stat show that the
pagesize of my database is 4k rather than zero:

| [bas at phil]~> db3_stat -d ~/.bogofilter/wordlist.db|grep Underlying
| 4096    Underlying database page size.

After fiddling around with the DB stat() call in db_open(), it turned
out I could get the correct pagesize if I removed the DB_CACHED_COUNTS
flag in line 289 of datastore_db.c.

Since I'm not sure what this flag does exactly, but I guess it should be
unset.  I'm using libdb 3.2.9 and libc6 2.2.5 on Debian 3.0 (woody).

I hope is is of any help to you.

-- 
Kind regards,
+---------------------------------------------------------------+
| Bas Zoetekouw                  | Si l'on sait exactement ce   |
|--------------------------------| que l'on va faire, a quoi    |
| bas at o2w.nl, bas at debian.org     | bon le faire?                |
| GPG key: 0644fab7              |               Pablo Picasso  |
+---------------------------------------------------------------+ 

----- End forwarded message -----




More information about the bogofilter-dev mailing list