https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6901
Bug ID: 6901
Summary: untie db first to fix "bayes db version 0 is not able
to be used, aborting!" problem
Product: Spamassassin
Version: 3.3.2
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: Learner
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
For the longest time, we've been seeing intermittent bayes db corruption with
the error:
"bayes: bayes db version 0 is not able to be used, aborting!"
After a week of adding more and more debug statements and getting more and more
confused, I finally concluded it had to be something weird in DB_File. I
finally created a test case that reproduced it, which resulted in this bug.
https://rt.cpan.org/Ticket/Display.html?id=83060
I'm still calming down from my swearing session.
It seems to me the easiest solution is to add:
untie %{$self->{$db_var}};
Before any call to tie.
Annoyingly, there was code in tie_db_readonly to do this, but it's commented
out and has been since the first commit.
# untie %{$self->{$db_var}} if (tied %{$self->{$db_var}});
Adding a similar line to tie_db_writeable would be good as well.
--
You are receiving this mail because:
You are the assignee for the bug.