[Spambayes] Database corruption [WAS] pop3proxy crashes
Skip Montanaro
skip at pobox.com
Sat Mar 8 11:29:49 EST 2003
>> There are >88,000 words in this database, and apparently the machine
>> was rebooted without a proper shutdown. This is bad.
Doc> I plugged my handspring into a USB port to do a sync (as usual) and
Doc> the machine completely froze (not as usual). Dead. Could no longer
Doc> even reach it from other machines on the network. So I had to power
Doc> down.
Doc> However, I do note that I was NOT doing any spambayes-related
Doc> operations at the time (unless pop3proxy goes off and does things
Doc> in the background, which I don't think it does).
If pop3proxy was running, even if it wasn't analyzing any messages at that
instant, it probably had the database open. For performance reasons, the
BerkeleyDB library does a fair amount of caching. It is quite possible the
database was in an invalid state at the time your machine froze.
All may not be lost however. Did your BerkeleyDB package come with a
db_recover command? If so, it may be able to repair the damage.
For those who haven't investigated all the mysteries of the BerkeleyDB
package, it comes with a number of command-line programs which manipulate
the database in various ways:
db_archive db_deadlock db_load db_recover db_upgrade
db_checkpoint db_dump db_printlog db_stat db_verify
You can read all about them at
http://www.sleepycat.com/docs/utility/index.html
Does anyone know if the Windows distribution of Python comes with these
utilities? If not, it probably should. db_dump, db_load, db_upgrade
db_verify and db_recover are particularly useful.
Skip
More information about the Spambayes
mailing list