Opened 14 years ago

Closed 14 years ago

#157 closed defect (fixed)

flappclient 'upload-file' error-handling bug

Reported by: Brian Warner Owned by:
Priority: major Milestone: 0.6.0
Component: error-handling Version: 0.5.1
Keywords: Cc:

Description

In http://tahoe-lafs.org/buildbot/builders/Kyle%20OpenBSD-4.6%20amd64/builds/369/steps/upload%20cov/logs/stdio it was clear that source:foolscap/appserver/services.py#L122 (FileUploader.remote_putfile._err) has a bug: the errback call uses "f" to hold the failure object, but this shadows the earlier use of "f" to hold the open file object. In an error case (such as when the uploader disconnects), this will throw an exception, and will probably leave the tempfile lying around.

flappclient --furlfile ../../upload-coverage.furl upload-file cov-*.tar.bz2
...
Command failed:
[CopiedFailure instance: Traceback from remote host -- Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 371, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/lib/pymodules/python2.6/foolscap/appserver/services.py", line 66, in _got_error
    self.d.errback(f)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 307, in errback
    self._startRunCallbacks(fail)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 354, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 371, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/lib/pymodules/python2.6/foolscap/appserver/services.py", line 123, in _err
    f.close()
exceptions.AttributeError: Failure instance has no attribute 'close'
]
program finished with exit code 255

Change History (1)

comment:1 Changed 14 years ago by Brian Warner

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.