#842 closed defect (fixed)
PipelineError during backup
Reported by: | francois | Owned by: | warner |
---|---|---|---|
Priority: | major | Milestone: | 1.6.0 |
Component: | code-network | Version: | 1.5.0 |
Keywords: | regression | Cc: | |
Launchpad Bug: |
Description
I'm using a fresh darcs checkout as of November 24 with Alberto Berti's patches for #641 applied.
A 'tahoe backup' run, sometimes crash with the following exception.
2009-11-24 09:38:21+0100 [Negotiation,client] Unhandled error in Deferred: 2009-11-24 09:38:21+0100 [Negotiation,client] Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/Twisted-8.1.0-py2.4-linux-i686.egg/twisted/internet/defer.py", line 312, in _startRunCallbacks self._runCallbacks() File "/usr/lib/python2.4/site-packages/Twisted-8.1.0-py2.4-linux-i686.egg/twisted/internet/defer.py", line 328, in _runCallbacks self.result = callback(self.result, *args, **kw) File "/usr/lib/python2.4/site-packages/Twisted-8.1.0-py2.4-linux-i686.egg/twisted/internet/defer.py", line 289, in _continue self.unpause() File "/usr/lib/python2.4/site-packages/Twisted-8.1.0-py2.4-linux-i686.egg/twisted/internet/defer.py", line 285, in unpause self._runCallbacks() --- <exception caught here> --- File "/usr/lib/python2.4/site-packages/Twisted-8.1.0-py2.4-linux-i686.egg/twisted/internet/defer.py", line 328, in _runCallbacks self.result = callback(self.result, *args, **kw) File "/root/tahoe/src/allmydata/immutable/encode.py", line 481, in _remove_shareholder level=log.UNUSUAL, failure=why) File "/root/tahoe/src/allmydata/immutable/encode.py", line 99, in log return log.msg(*args, **kwargs) File "/root/tahoe/support/lib/python2.4/site-packages/foolscap-0.4.2-py2.4.egg/foolscap/logging/log.py", line 197, in msg f2.setCopyableState(fs.getStateToCopy(f, FakeBroker)) File "/root/tahoe/support/lib/python2.4/site-packages/foolscap-0.4.2-py2.4.egg/foolscap/call.py", line 796, in getStateToCopy state['value'] = str(obj.value) # Exception instance exceptions.AttributeError: PipelineError instance has no attribute 'args'
Change History (6)
comment:1 Changed at 2009-11-24T15:42:06Z by zooko
- Keywords regression added
- Milestone changed from undecided to 1.6.0
comment:2 Changed at 2009-11-24T15:44:23Z by zooko
- Owner set to warner
Brian, could you look at this?
I really don't understand this part:
File "/root/tahoe/support/lib/python2.4/site-packages/foolscap-0.4.2-py2.4.egg/foolscap/call.py", line 796, in getStateToCopy state['value'] = str(obj.value) # Exception instance exceptions.AttributeError: PipelineError instance has no attribute 'args'
There is no attempt to access an attribute named 'args' on that line, so how can there be an AttributeError on 'args'?
comment:3 Changed at 2009-11-24T20:07:27Z by warner
I think the problem is that PipelineError is not str-able (it overrides __init__ and __repr__ but not __str__).
If I had to guess, I'd say that a connection was lost during the upload, the encoder tried to log.msg the exception instance, but it wasn't str-able so it blew up. I'd also guess that this has been a problem since that Pipeline class went into 1.5.0, but only shows up if you get an exception during upload.
I'll add a test of str-ability and fix the class (source:src/allmydata/util/pipeline.py in case anyone's curious).
comment:4 Changed at 2009-11-24T20:49:08Z by warner
hrm, I'm not seeing the test fail on my py2.6 system. Maybe py2.5 or py2.6 started implementing str() in terms of repr(), thus masking the problem?
comment:5 Changed at 2009-11-24T21:34:10Z by warner
- Resolution set to fixed
- Status changed from new to closed
Ok, 41bcc9f39ec52c7e should close this. Python2.5/2.6 don't suffer from the problem, but py2.4 does. francois: could you check that test_util.Pipeline passes with the new patch? If so, this problem should be resolved.
comment:6 Changed at 2009-11-25T17:58:11Z by francois
Wouah, that was fast, thanks Brian.
And, yes, the unit test passed on my old Debian etch machine.
Marking this as potentially a regression from v1.5.