[spambayes-bugs] [ spambayes-Support Requests-803901 ] spambayes-1.0a5 DB_RUNRECOVERY when training

SourceForge.net noreply at sourceforge.net
Tue Sep 16 01:54:37 EDT 2003


Support Requests item #803901, was opened at 2003-09-11 06:04
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498104&aid=803901&group_id=61702

Category: None
Group: None
>Status: Closed
Priority: 5
Submitted By: Yom Gritzko (somecallmetim)
Assigned to: Nobody/Anonymous (nobody)
Summary: spambayes-1.0a5 DB_RUNRECOVERY when training

Initial Comment:
I installed spambayes-1.0a5 into a directory on my 

Windows XP box.



I copied the hammie.db and the bayescustomize.ini from 

myspambayes-1.0a4 directory into the spambayes-1.0a5 

directory. I fired up spambayes and was able to 

successfully train using some received messages.



I went into the configuration page then to the advanced 

I said yes to adding the probability score to the header 

and saved the configuration.  Sometime later...I'm not 

sure when, when I tried to train I get the following error:





Training... 

500 Server error



Traceback (most recent call last):

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\Dibbler.py", line 453, in found_terminator

    getattr(plugin, name)(**params)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\ProxyUI.py", line 309, in onReview

    targetCorpus.takeMessage(id, sourceCorpus)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\Corpus.py", line 201, in takeMessage

    self.addMessage(msg)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\FileCorpus.py", line 143, in addMessage

    Corpus.Corpus.addMessage(self, message)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\Corpus.py", line 136, in addMessage

    obs.onAddMessage(message)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\storage.py", line 552, in onAddMessage

    self.train(message)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\storage.py", line 560, in train

    self.bayes.learn(message.tokenize(), self.is_spam)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\classifier.py", line 276, in learn

    self._add_msg(wordstream, is_spam)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\classifier.py", line 411, in _add_msg

    self._wordinfoset(word, record)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\storage.py", line 257, in _wordinfoset

    self.db[word] = record.__getstate__()

  File "D:\Python23\lib\shelve.py", line 130, in 

__setitem__

    self.dict[key] = f.getvalue()

  File "D:\Python23\lib\bsddb\__init__.py", line 90, in 

__setitem__

    self.db[key] = value

DBRunRecoveryError: (-30982, 'DB_RUNRECOVERY: Fatal 

error, run database recovery -- fatal region error 

detected; run recovery')



I went back into the advanced configuration and clicked 

on the restore button and I get this:



500 Server error



Traceback (most recent call last):

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\Dibbler.py", line 453, in found_terminator

    getattr(plugin, name)(**params)

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\UserInterface.py", line 703, in 

onRestoredefaults

    self.reReadOptions()

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\ProxyUI.py", line 510, in reReadOptions

    state.bayes.store()

  File "D:\Utils\spambayes\spambayes-1.

0a5\spambayes\storage.py", line 201, in store

    self.db[key] = val.__getstate__()

  File "D:\Python23\lib\shelve.py", line 130, in 

__setitem__

    self.dict[key] = f.getvalue()

  File "D:\Python23\lib\bsddb\__init__.py", line 90, in 

__setitem__

    self.db[key] = value

DBRunRecoveryError: (-30982, 'DB_RUNRECOVERY: Fatal 

error, run database recovery -- fatal region error 

detected; run recovery')



How does one recover the database?



Thanks

----------------------------------------------------------------------

>Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-16 17:54

Message:
Logged In: YES 
user_id=552329

You *should* only have to copy the hammie.db file to keep 

your training.  If you want to keep your configuration 

settings, you also need to copy over the bayescustomize.ini 

file.  Ideally you should copy the messageinfo.db file as well, 

but it shouldn't matter if this gets deleted (for pop3proxy; it 

does for other apps).



It sounds like something happened that corrupted the 

database but it's not clear what.  It shouldn't be related to 

the option change, or the messageinfo file not being there.



As to how to recover the database: there are tools from 

berkeley that apparently let you do this, but I haven't seen 

reports of any successful attempts.  The best bet is to either 

go back to a known good copy (as you did), or retrain from 

scratch.



Please let us know if the database corruption happens again, 

especially if you can reproduce it.

----------------------------------------------------------------------

Comment By: Yom Gritzko (somecallmetim)
Date: 2003-09-11 06:14

Message:
Logged In: YES 
user_id=685368

I recopied the hammie db from the 1.0a4 and this time also 

copied the spambayes.messageinfo file over the ones in the 1.

0a5 directory, restarted spambayes and was able to train 

some messages once.  What files need to be copied when 

upgrading from 1.0a4 to 1.0a5 if one doesn't want to lose the 

accumulated training?



Thanks!



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498104&aid=803901&group_id=61702



More information about the Spambayes-bugs mailing list