catastrophic recovery required

Matthias Andree matthias.andree at gmx.de
Wed Feb 16 14:02:11 CET 2005


Ben Finney <ben at benfinney.id.au> writes:

> I've since realised that it's specific messages causing the problem.
> Here's a (hopefully more informative) session:
>
> =====
> $ bogofilter -Ns < $HOME/Mail/.spam-unsure/cur/1108518134.4631_2.iris\:2\,S
> checksum error: page 995: catastrophic recovery required
> PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
> wordlist.db: pgin failed for page 995
> bogofilter: (db) DB->get(TXN=134698328,  'Prozac' ), err: DB_RUNRECOVERY: Fatal error, run database recovery
> PANIC: fatal region error detected; run recovery
> bogofilter: DB_TXN->abort(80000002) error: DB_RUNRECOVERY: Fatal error, run database recovery

OK. My scoop of this is:

1. Berkeley DB uses database pages that are larger than hard disk drive
   blocks.

2. No Linux file system and device driver in production quality and
   default settings guarantees atomic writes of Berkeley DB pages.

3. ext3fs with data=journal mount option SHOULD be able to write memory
   page size (4k) atomically AFAIR.

4. The power losses you reported on 2005-02-05 caused partial writes to
   database pages that a subsequent regular recovery did not
   detect. (Below more.)

5. The message contains a particular token, here "Prozac", that is on
   a broken database page.

6. db-prune runs caused the removal of inactive log files, rendering
   catastrophic recovery impossible.

7. If however you have kept backup copies of your logfiles, put them
   into your .bogofilter directory and run
   "bogoutil --db-recover-harder ~/.bogofilter"

> $ bogoutil --db-prune $HOME/.bogofilter/
>
> $ bogofilter -Ns < $HOME/Mail/.spam-unsure/cur/1108518134.4631_2.iris\:2\,S
> checksum error: page 995: catastrophic recovery required

The regular database recovery triggered by --db-prune did not detect or
repair this corruption, possibly because writes were out of order.

Did you disable the write caches as laid out in README.db? If you did
not, that may have been the cause for the troubles you're witnessing. I
suggest disabling the write caches if you have flakey power supply.

At any rate, check the README.db revision I posted on 2005-02-05 for
recovery procedures. If you have log file backups, replace them (do not
replace newer log files that are still there) and try catastrophic
recovery, if you don't, kill the directory and re-train from scratch.

-- 
Matthias Andree



More information about the Bogofilter mailing list