SA Bugzilla – Bug 5482
cannot open bayes databases
Last modified: 2013-01-20 17:30:27 UTC
spamassassin server - 3gb ram, intel quad core 2.4 cpu,freebsd 6.2 Every day the bayesian database gets corrupted. We see the following in the log file. We only use sqlite for scores. bayes: cannot open bayes databases /usr/local/share/spamassassin/bayes_* R/W: lock failed: Interrupted system call When we see the following in the logfile memory is at 1gig +. However after restarting spamassassin there are memory usage goes right back to 400mb. Something is corrupting the database. I have to stop spamassassin, rm bayes* and restart spamassassin. Thanks.
I see the same problem since 3.2.0, now also with 3.2.1. We are using SA with spampd with maxchildren set to 25. This has worked fine for years until 3.2.0. The only real difference I see is that after wiping bayes_*, SA didn't start using bayes_journal, which always was used before. I have now set "bayes_learn_to_journal 1", let's see how it works.
I have the same problem on 3.2.2 on Linux platform (Fedora Core 3). The log file shows: bayes: cannot open bayes databases /tmp/.spamassassin/bayes_* R/W: lock failed: Interrupted system call now I try the setting below and see how it works. bayes_auto_expire 0 bayes_learn_to_journal 1 bayes_journal_max_size 0 http://rivviepop.wordpress.com/2006/09/09/spamassassin-bayes-and-berkeley-db/
Using "bayes_learn_to_journal 1" made it work for me. I guess using bayes_auto_expire 0 bayes_journal_max_size 0 makes you end up in other problems with the size of you bayes.
I am getting messages of the form: bayes: cannot open bayes databases /usr/local/share/sa-bayes/name_* R/W: lock failed: Interrupted system call From October 20, 2008 through February, 2010, I was getting that message about once per month. Starting on March 14, 2010, after upgrading to the then-current version of spamassassin, I started getting that message about every 20 minutes, and every time I invoked sa-learn to learn a new spam message, it timed out with a similar error about not being able to open the bayes database. I have upgraded one more time since then, and still get the same message and cannot use sa-learn. I have started using "spamc -L spam" to learn spam, which seems to work, although sometimes it reports that it has already learned a message that I know it has never seen before. My local.cf file contains the following: lock_method flock required_score 3.00 #spam_level_char o rewrite_header Subject "****SPAMLEVEL: _SCORE_ ****" dns_available yes skip_rbl_checks 0 #use_razor1 0 use_pyzor 0 auto_whitelist_path /var/spool/spamassassin/auto-whitelist auto_whitelist_file_mode 0666 bayes_auto_learn 1 bayes_learn_to_journal 1 bayes_path /usr/local/share/sa-bayes/name bayes_file_mode 666
> bayes_learn_to_journal 1 Note: this line was added to my local.cf file today, after reading the prior reports in this bug.
Considered a configuration issue.