[tor-bugs] #7152 [Stem]: Implement Controller.attach_stream

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Dec 31 03:30:41 UTC 2012


#7152: Implement Controller.attach_stream
----------------------------+-----------------------------------------------
    Reporter:  neena        |       Owner:  atagar    
        Type:  task         |      Status:  closed    
    Priority:  normal       |   Milestone:            
   Component:  Stem         |     Version:            
  Resolution:  implemented  |    Keywords:  controller
      Parent:               |      Points:            
Actualpoints:               |  
----------------------------+-----------------------------------------------
Changes (by atagar):

  * status:  needs_review => closed
  * resolution:  => implemented


Comment:

 Looks great! Merged with some minor changes (*)...

 https://gitweb.torproject.org/stem.git/commit/af6fd83f74f6f39981cb32e1f871421755edfdaa

 The ONLINE target (especially this test) is really flaky. The two most
 common failures I've seen is...

 * Circuits fail to be created/extended around 1/7th of the time, breaking
 the test.

 * Even if we get to the end of the test asserting the ip sometimes
 fails...

 {{{
 ======================================================================
 FAIL: test_attachstream
 ----------------------------------------------------------------------
 Traceback:
   File "/home/atagar/Desktop/stem/test/integ/control/controller.py", line
 748, in test_attachstream
     self.assertEquals(exit_ip, ip)
 AssertionError: '37.130.227.132' != '37.130.227.133'

 ----------------------------------------------------------------------
 Ran 25 tests in 20.524s
 }}}

 This mostly happens with the Torland exits. Iirc there's no assurance that
 the exit's ip is the location that we'll actually exit from, and many
 large exits don't.

 * Sometimes when we attempt to call external_ip() it hangs. Then when I
 hit ctrl+c our tor instance is in some sort of bad state. The following
 SETEVENTS call fails with '[Errno 104] Connection reset by peer' and all
 further attempts to establish a controller connection fails with
 'connection refused'.

 The first couple could be addressed by adding retries to the test. The
 last I really haven't a clue, and changes I've made might have
 inadvertently fixed it (I haven't seen it the last dozen times I've run
 'em).

 I'd love to see a patch to add the retries but for the purposes of this
 ticket I think that we can safely call this done.

 Cheers! -Damian

 * Ok, ok, maybe not so minor, but I really did mean to just revise and
 merge this branch! Then one thing led to another, and six hours later I
 kinda-sorta had a few more things added in.

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


More information about the tor-bugs mailing list