'no attribute stopProducing' exception in new mutable Retrieve path #1521

Closed
opened 2011-09-01 16:14:24 +00:00 by warner · 2 comments

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.

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.
warner added the
code-mutable
major
defect
1.9.0a1
labels 2011-09-01 16:14:24 +00:00
warner added this to the 1.9.0 milestone 2011-09-01 16:14:24 +00:00
davidsarah commented 2011-09-01 17:41:45 +00:00
Owner

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.
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. ```
Author

Fixed, in changeset: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.

Fixed, in changeset: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.
warner added the
fixed
label 2011-09-09 18:42:46 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1521
No description provided.