#1521 closed defect (fixed)

'no attribute stopProducing' exception in new mutable Retrieve path

Reported by: warner Owned by:
Priority: major Milestone: 1.9.0
Component: code-mutable Version: 1.9.0a1
Keywords: Cc:
Launchpad Bug:

Description

When downloading a mutable file, if the HTTP client disconnects early, an exception shows up in the node's logs/twistd.log:

2011-09-01 08:46:53-0700 [HTTPChannel,61,127.0.0.1] Unhandled Error
        Traceback (most recent call last):
          File "/Library/Python/2.6/site-packages/Twisted-10.2.0-py2.6-macosx-10.6-universal.egg/twisted/application/app.py", line 311, in runReactorWithLogging
            reactor.run()
          ...(elided boring stuff)...
          File "/Library/Python/2.6/site-packages/Twisted-10.2.0-py2.6-macosx-10.6-universal.egg/twisted/internet/posixbase.py", line 253, in _disconnectSelectable
            selectable.connectionLost(f)
          File "/Library/Python/2.6/site-packages/Twisted-10.2.0-py2.6-macosx-10.6-universal.egg/twisted/internet/tcp.py", line 513, in connectionLost
            abstract.FileDescriptor.connectionLost(self, reason)
          File "/Library/Python/2.6/site-packages/Twisted-10.2.0-py2.6-macosx-10.6-universal.egg/twisted/internet/abstract.py", line 157, in connectionLost
            self.producer.stopProducing()
        exceptions.AttributeError: Retrieve instance has no attribute 'stopProducing'

It looks like the new MDMF downloader's Producer is missing some of the control-flow methods. The exception is invisible from the HTTP client (after all, it just disconnected), but it's noisy in the node, and might mean that the node keeps downloading the rest of the file even though nobody's listening anymore.

We should really fix this for 1.9, as it probably shows up in SDMF downloads too. Not super critical, but more than nice-to-have.

Change History (2)

comment:1 Changed at 2011-09-01T17:41:45Z by davidsarah

Incidentally, the interface check in #1474 picks up this error:

allmydata.mutable.retrieve.Retrieve does not implement <InterfaceClass twisted.internet.interfaces.IPushProducer>                                        
An object has failed to implement interface <InterfaceClass twisted.internet.interfaces.IPushProducer>                                                   
                                                                                                                                                         
        The stopProducing attribute was not provided.

comment:2 Changed at 2011-09-09T18:42:46Z by warner

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, in a15ce96846c301a4, part of a series of patches that rewrote the control flow of Retrieve to make sure we don't drop any exceptions on the floor.

Note: See TracTickets for help on using tickets.