Resource Limit Check Failure
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
The unsigned compare bug in check_fsize_limit is back.
Specifically in bogofilter 1.1.3 the comparison against
RLIM_INFINITY on line 475 of datastore_db.c
if (rl.rlim_cur != (rlim_t)RLIM_INFINITY) {
I've used ulimit to set max file size to unlimited,
But I still get bogofilter complaining about db size
approaching maximum file size, and eventually refusing
to process.
On my system (SuSE 9.1 with Linux 2.6.13.5 kernel)
RLIM_INFINITY is -1
rl.rlim_cur is -1
rl.rlim_max is -1
BUT (ultimately)
rlim_t is unsigned long int
Logged In: YES
user_id=30510
Originator: NO
The code for checking rl.rlim_cur was added to datastore_db between Aug 2003 and Dec 2003. It has _not_ changed in the 3 years since then.
Function check_fsize_limit()'s math has not changed. The function prints slightly different messages now and returns a boolean (rather than exit).
Why do you say "the problem is back"? What version of bogofilter were you using? Have you changed hardware? distro?
I'll be able to check further when I have better info on what you've got and precisely what you expect to see.
Logged In: YES
user_id=30510
Originator: NO
The code for checking rl.rlim_cur was added to datastore_db between Aug 2003 and Dec 2003. It has _not_ changed in the 3 years since then.
Function check_fsize_limit()'s math has not changed. The function prints slightly different messages now and returns a boolean (rather than exit).
Why do you say "the problem is back"? What version of bogofilter were you using? Have you changed hardware? distro?
I'll be able to check further when I have better info on what you've got and precisely what you expect to see.
Logged In: YES
user_id=1663969
Originator: YES
I only said "back" because of the comment that follows this check in the source code. I wasn't intending to do a historical analysis, just to indicate that the test was not doing what was intended.
My bogofilter was compiled with:gcc version 3.3.3 (SuSE Linux)
I've always had a problem with bogofilter claiming that the
db size was approaching the resource limit even though
I've always use ulimit to set the resource size to unlimited.
I haven't changed distro, or compiler in years.
This is not a new problem, I just finally got annoyed enough
to report it since my spam level had increased and I now
need to trim the db a couple of times a month.
What I expect is that the test should correctly discover that
the resource limit for files has been set to infinity and
that bogofilter should not do the tests about db size approaching a limit.
Logged In: YES
user_id=30510
Originator: NO
I'm still not clear what problem you are reporting.
You mention (and quote) line 475. In line 475, rl.rlim_cur is of type rlim_t and is being compared to another rlim_t.
You mention db size approaching maximum file size, but don't mention either value.
I also don't see a problem with the comment.
As far as I can tell, line 475's test is correctly determining whether the resource limit has been set to infinity and, if so, is skipping further tests.
Further information/explanation is needed if anything is to be changed.
Logged In: YES
user_id=2788
Originator: NO
SUSE Linux 9.1 is no longer supported by the vendor,
thus not by the Bogofilter team either.