[tor-bugs] #28961 [Core Tor/Stem]: exception in descriptor/remote.py downloading large server descriptors via orport

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 23 20:48:52 UTC 2019


#28961: exception in descriptor/remote.py downloading large server descriptors via
orport
---------------------------+--------------------------
 Reporter:  starlight      |          Owner:  atagar
     Type:  defect         |         Status:  reopened
 Priority:  Medium         |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+--------------------------
Changes (by atagar):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Thanks starlight! Great catches. Made a
 [https://gitweb.torproject.org/stem.git/commit/?id=2e86567b0cbcae03ddf1bec335808cd51329c961
 small fix] for the timeouts. As for cropped responses you are absolutely
 correct, thanks for catching that!

 Reproed locally and in hacking things up I can trivially fix it with...

 {{{
 --- a/stem/client/__init__.py
 +++ b/stem/client/__init__.py
 @@ -289,6 +289,15 @@ class Circuit(object):
        # updates when handled successfully.

        reply = self.relay._orport.recv()
 +
 +      while True:
 +        more = self.relay._orport.recv(timeout = 1)
 +
 +        if more is None:
 +          break
 +
 +        reply += more
 +
        reply_cells = []

        while reply:
 }}}

 But that's just a hack and not valid solution. The root issue I need to
 sort out is 'how can I tell when we've received the full reply to our
 request'. There's probably a 'size' field or something else I'm forgetting
 to consult so this will need some more digging on my part.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28961#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list