#561 closed defect

cpu-watcher not resilient to corrupted pickles — at Initial Version

Reported by: zandr Owned by: nobody
Priority: major Milestone: undecided
Component: code-nodeadmin Version: 1.2.0
Keywords: error cpu-watcher statistics easy reliability pickle Cc:
Launchpad Bug:

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@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@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.

Change History (0)

Note: See TracTickets for help on using tickets.