[tahoe-lafs-trac-stream] [tahoe-lafs] #561: cpu-watcher not resilient to corrupted pickles

tahoe-lafs trac at tahoe-lafs.org
Fri Jan 17 23:27:22 UTC 2014


#561: cpu-watcher not resilient to corrupted pickles
-------------------------+-------------------------------------------------
     Reporter:  zandr    |      Owner:
         Type:  defect   |     Status:  new
     Priority:  major    |  Milestone:  undecided
    Component:  code-    |    Version:  1.2.0
  nodeadmin              |   Keywords:  error cpu-watcher statistics easy
   Resolution:           |  reliability pickle
Launchpad Bug:           |
-------------------------+-------------------------------------------------
Changes (by daira):

 * keywords:  error cpu-watcher statistics easy reliability => error cpu-
     watcher statistics easy reliability pickle


Old description:

> I've seen a number of EOF errors trying to read the pickle, which seems
> like it should be pretty easy to trap.
>
> This one, however, stumped me. First, I got:
>

> {{{
> amduser at prodtahoe1:~/prodnet/cpu-watcher$ tahoe start .
> STARTING /home/amduser/prodnet/cpu-watcher
>
> Failed to load application: '9'
> unknown (cpu-watcher.tac) node probably not started
> }}}
>
> Zooko helpfully suggested I try:
>
> {{{
> amduser at prodtahoe1:~/prodnet/cpu-watcher$ python -u cpu-watcher.tac
> Traceback (most recent call last):
>   File "cpu-watcher.tac", line 227, in <module>
>     CPUWatcher().setServiceParent(application)
>   File "cpu-watcher.tac", line 106, in __init__
>     self.history = pickle.load(open("history.pickle", "rb"))
>   File "/usr/lib/python2.5/pickle.py", line 1370, in load
>     return Unpickler(file).load()
>   File "/usr/lib/python2.5/pickle.py", line 858, in load
>     dispatch[key](self)
> KeyError: '9'
> }}}
>
> Deleting the pickle solved the problem.

New description:

 I've seen a number of EOF errors trying to read the pickle, which seems
 like it should be pretty easy to trap.

 This one, however, stumped me. First, I got:


 {{{
 amduser at prodtahoe1:~/prodnet/cpu-watcher$ tahoe start .
 STARTING /home/amduser/prodnet/cpu-watcher

 Failed to load application: '9'
 unknown (cpu-watcher.tac) node probably not started
 }}}

 Zooko helpfully suggested I try:

 {{{
 amduser at prodtahoe1:~/prodnet/cpu-watcher$ python -u cpu-watcher.tac
 Traceback (most recent call last):
   File "cpu-watcher.tac", line 227, in <module>
     CPUWatcher().setServiceParent(application)
   File "cpu-watcher.tac", line 106, in __init__
     self.history = pickle.load(open("history.pickle", "rb"))
   File "/usr/lib/python2.5/pickle.py", line 1370, in load
     return Unpickler(file).load()
   File "/usr/lib/python2.5/pickle.py", line 858, in load
     dispatch[key](self)
 KeyError: '9'
 }}}

 Deleting the pickle solved the problem.

--

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/561#comment:5>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list