[tor-bugs] #8701 [Tor]: Stem doesn't recognize error 555 on attach_stream

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Apr 14 20:40:48 UTC 2013


#8701: Stem doesn't recognize error 555 on attach_stream
-------------------------+--------------------------------------------------
 Reporter:  cypherpunks  |          Owner:  atagar
     Type:  defect       |         Status:  new   
 Priority:  normal       |      Milestone:        
Component:  Tor          |        Version:        
 Keywords:               |         Parent:        
   Points:               |   Actualpoints:        
-------------------------+--------------------------------------------------

Comment(by arma):

 {{{
   if (ENTRY_TO_CONN(ap_conn)->state != AP_CONN_STATE_CONTROLLER_WAIT &&
       ENTRY_TO_CONN(ap_conn)->state != AP_CONN_STATE_CONNECT_WAIT &&
       ENTRY_TO_CONN(ap_conn)->state != AP_CONN_STATE_RESOLVE_WAIT) {
     connection_write_str_to_buf(
                     "555 Connection is not managed by controller.\r\n",
                     conn);
     return 0;
   }
 }}}

 This happens when you try to attachstream a stream that isn't in a state
 where we think you should be able to do so. For example, if you try to
 attachstream an open stream, it should fail.

 That said, there may be a bug here: the 'if' I just quoted doesn't
 consider AP_CONN_STATE_CIRCUIT_WAIT. That is, you can't ask to
 attachstream a stream that is waiting for Tor to produce a suitable
 circuit. That is probably because we assumed an implicit invariant that
 there *is* no acceptable circuit for a stream in this state (if there were
 one, the stream wouldn't still be in this state). But a) we might be
 wrong, and b) why constrain controllers?

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


More information about the tor-bugs mailing list