You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Paul R. Ganci" <pr...@mric.coop> on 2005/06/17 07:05:17 UTC

Re: Bayes Database RW Lock

Matt Kettler wrote:

>Paul R. Ganci wrote:
>  
>
>>-rw-rw-rw-    1 prganci  users      165988 May 14 10:05 bayes_journal
>>-rw-------    1 pangione users          34 May 14 10:00 bayes.lock 
>>    
>>
>That's a little troubling.. are you having problems with spamd instances
>crashing? The lock is at least 5 minutes old here.. that's a long time unless an
>expiry is being run.
>
This is a month old thread, but I think I may have found out what is 
going on here. I am having trouble running an expiry:

[spamassassin]# /home/spam-filter/bin/sa-learn  --force-expire
__db_assert: "TYPE(h) == P_INVALID" failed: file 
"../dist/../db/db_meta.c", line 106
Aborted (core dumped)

I assume this message implies my Bayes database is corrupted and that is 
why I keep finding stale lock files. Namely every bayes_journal_max_size 
= 102400 Bytes (or whatever unit) the system attempts to sync the Bayes 
database which crashes leaving behind the lock file. Does this scenario 
seem plausible or am I all wet? Is there something I can do to fix this 
problem?

--
Paul (prganci@mric.coop)


Re: Bayes Database RW Lock

Posted by "Paul R. Ganci" <pr...@mric.coop>.
Paul R. Ganci wrote:

> I assume this message implies my Bayes database is corrupted and that 
> is why I keep finding stale lock files. Namely every 
> bayes_journal_max_size = 102400 Bytes (or whatever unit) the system 
> attempts to sync the Bayes database which crashes leaving behind the 
> lock file.

I fixed my database (or at least so far it seems) with this sequence:

[spamassassin]# mv bayes_seen bayes_seen-raq-3.0.2
[spamassassin]# mv bayes_toks bayes_toks-raq-3.0.2
[spamassassin]# db_dump bayes_seen-raq-3.0.2 >bayes_seen-raq-3.0.2.dump
[spamassassin]# db_dump bayes_toks-raq-3.0.2 >bayes_toks-raq-3.0.2.dump
[spamassassin]# db_load -f ./bayes_seen-raq-3.0.2.dump bayes_seen
[spamassassin]# db_load -f ./bayes_toks-raq-3.0.2.dump bayes_toks
[spamassassin]# sa-learn  --import

Now instead of a core dump I get:

[spamassassin]# sa-learn  --sync
synced Bayes databases from journal in 0 seconds: 1005 unique entries 
(1331 total entries)

All seems better now.

-- 
Paul (prganci@mric.coop)