You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mike Fahey <mf...@enter.net> on 2008/02/20 21:00:01 UTC

cannot open bayes databases Interrupted system call

Every 24 hours I see the following errors and spamassassin has to be 
restarted. Other machines running SA are fine.

SA 3.2.4_1
freebsd 6.2
perl5.8.8

spamd[19777]: bayes: cannot open bayes databases 
/usr/local/share/spamassassin/bayes_* R/W: lock failed: Interrupted 
system call


Re: cannot open bayes databases Interrupted system call

Posted by Mike Fahey <mf...@enter.net>.
I'll give this a shot. thanks


Matt Kettler wrote:
> Mike Fahey wrote:
> 
>> This page specifically uses /etc/mail/spamassassin.
> 
> Yeah, I read that the first time. It is wrong.  In fact, I'd say it's 
> stupid.
> 
> I'll go edit the wiki article when I get a chance, but I want to have 
> some time to really sit down and do an extensive rewrite there. There's 
> a lot of facts that should be there, which aren't.
> 
> If nothing else, there needs to be NO OTHER FILES starting with "bayes" 
> in your /etc/mail/spamassassin for that to work! If you've got a 
> bayes_rescore.cf in there, you're going to break.
> 
> Also, /etc/ isn't intended to store data that changes constantly. It is 
> completely contrary to the Unix philosophy to store a database here.
> 
> Therefore, using all possible strength, and all possible expertise that 
> my position as a member of the SpamAssassin Project Management Committee 
> conveys, I strongly advise not following the advice of that wiki 
> article. At least as far as using "bayes_path 
> /etc/mail/spamassassin/bayes".
> 
> 
> 
> 
> 
>> I believe its hardware related, as other machines work fine.
> 
> It could be  rights related.. what are the permissions on 
> /etc/mail/spamassassin/? Is it world rwx (dangerous!)?
> 
> It could also be related to a file starting with bayes in there that's 
> not a part of the bayes DB..
> 
> ls /etc/mail/spamassassin/bayes*
> 
> Is there anything but bayes_seen, bayes_toks and bayes_journal?
> 
> 
> 
>>
>> Does anyone else have any tweaks for global bayes ?
>>
> Yeah, put it in its own directory, and not in /etc/.
> 
> 

Re: cannot open bayes databases Interrupted system call

Posted by Matt Kettler <mk...@verizon.net>.
Mike Fahey wrote:
> This page specifically uses /etc/mail/spamassassin.
Yeah, I read that the first time. It is wrong.  In fact, I'd say it's 
stupid.

I'll go edit the wiki article when I get a chance, but I want to have 
some time to really sit down and do an extensive rewrite there. There's 
a lot of facts that should be there, which aren't.

If nothing else, there needs to be NO OTHER FILES starting with "bayes" 
in your /etc/mail/spamassassin for that to work! If you've got a 
bayes_rescore.cf in there, you're going to break.

Also, /etc/ isn't intended to store data that changes constantly. It is 
completely contrary to the Unix philosophy to store a database here.

Therefore, using all possible strength, and all possible expertise that 
my position as a member of the SpamAssassin Project Management Committee 
conveys, I strongly advise not following the advice of that wiki 
article. At least as far as using "bayes_path /etc/mail/spamassassin/bayes".





> I believe its hardware related, as other machines work fine.
It could be  rights related.. what are the permissions on 
/etc/mail/spamassassin/? Is it world rwx (dangerous!)?

It could also be related to a file starting with bayes in there that's 
not a part of the bayes DB..

ls /etc/mail/spamassassin/bayes*

Is there anything but bayes_seen, bayes_toks and bayes_journal?



>
> Does anyone else have any tweaks for global bayes ?
>
Yeah, put it in its own directory, and not in /etc/.



Re: cannot open bayes databases Interrupted system call

Posted by Mike Fahey <mf...@enter.net>.
This page specifically uses /etc/mail/spamassassin. I believe its 
hardware related, as other machines work fine.

Does anyone else have any tweaks for global bayes ?

 



Matt Kettler wrote:
> Mike Fahey wrote:
>> I'm using site wide Bayesian Filtering.
>> These files can become very large anywhere from 200mb to 2gb.
>>
>> Looking at 
>> http://wiki.apache.org/spamassassin/SiteWideBayesSetup?highlight=%28bayes%29 
>>
>> it says to set the bayes_path to
>> /etc/mail/spamassassin/bayes
>>
>> What do you suggest?
> I'd suggest something in /var.  Preferably not a subdirectory of your 
> rule directories.. ie: /var/spamassassin/bayes/bayes
>
> Make sure said directory is world rwx. (this part is why you don't 
> want it in your /etc/mail/spamassassin.

Re: cannot open bayes databases Interrupted system call

Posted by Matt Kettler <mk...@verizon.net>.
Mike Fahey wrote:
> Every 24 hours I see the following errors and spamassassin has to be 
> restarted. Other machines running SA are fine.
>
> SA 3.2.4_1
> freebsd 6.2
> perl5.8.8
>
> spamd[19777]: bayes: cannot open bayes databases 
> /usr/local/share/spamassassin/bayes_* R/W: lock failed: Interrupted 
> system call
Um, why's it trying to create a bayes database in 
/usr/local/share/spamassassin/ ??

That's *DANGEROUS*.

DO NOT point bayes_path there.. DO NOT set any user's home directory to 
/usr/share/spamassassin.

This *WHOLE* directory gets obliterated without prompts or warning when 
you upgrade. It should contain nothing but the distribution provided 
rulesets. Nothing else.