You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Simon Talbot <si...@nse.co.uk> on 2004/06/26 18:05:11 UTC
Problem with current snapshot
Hi All,
I have been doing some work with the current snapshot and have noticed a
minor problem with the way the bayed journal file is created.
In file: lib/Mail/SpamAssassin/BayesStore/DBM.pm around line 1301 we
have:
########################################################################
###
sub _get_journal_filename {
my ($self) = @_;
if (defined $self->{journal_live_path}) {
return $self->{journal_live_path};
}
my $main = $self->{bayes}->{main};
my $fname = $main->sed_path ($main->{conf}->{bayes_path}."_journal");
$self->{journal_live_path} = $fname;
return $self->{journal_live_path};
}
What I have noticed is as follows:
When spamd is started with the following options: SPAMDOPTIONS="-x -u
spamd -d -m 20 -H /home/spamd/"
There is a bug in the logic here which locks the Journal file into
memory
_get_journal_filename first gets called before the config file has been
read, so locks the
Journal path as /tmp/init-??-spamd/.spamassassin etc.
The startup process later deletes this directory causing errors when the
spamd processes try to write to it.
Subsequent calls to _get_journal_filename, after the config file has
been read, read this erroneous setting which was stored
Earlier and never get the correct value from the config file.
If you comment out:
if (defined $self->{journal_live_path}) {
return $self->{journal_live_path};
}
Making the setting get read on every call, the system gets the correct
path on the second and subsequent calls and the baysean journal
functions correctly.
For the moment I have left this commented out in my version of the code,
but this is not a long term solution -- not knowing enough about the
codebase, I thought I would pass this to the devel list who can correct
the problem in a more suitable, permanent way.
Simon
Simon Talbot MEng, ACGI
(Chief Engineer)
Tel: 0845 6440972
Fax: 0845 6440971
Re: Problem with current snapshot
Posted by Michael Parker <pa...@pobox.com>.
Can you please define snapshot. Have you tried -pre1?
Sounds like this bug:
http://bugzilla.spamassassin.org/show_bug.cgi?id=3334
Possibly it still exists. If you are indeed using -pre1 or at least a
revision >= 21432 please submit a proper Bugzilla bug.
Michael