[tor-bugs] #2279 [Tor Client]: Duplicate call to connection_mark_for_close

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Dec 10 18:18:34 UTC 2010


#2279: Duplicate call to connection_mark_for_close
-------------------+--------------------------------------------------------
 Reporter:  Kiyoo  |        Type:  defect    
   Status:  new    |    Priority:  normal    
Milestone:         |   Component:  Tor Client
  Version:         |    Keywords:            
   Parent:         |  
-------------------+--------------------------------------------------------

Comment(by nickm):

 Hm.  connection.c:1175 is the one here, inside
 connection_handle_listener_read:
 {{{
   if (connection_init_accepted_conn(newconn, conn->type) < 0) {
     connection_mark_for_close(newconn);
     return 0;
   }
 }}}

 and connection_edge.c:1618 is the one here, inside
 connection_ap_handle_rewrite_and_attach():
 {{{
     conn->_base.state = AP_CONN_STATE_CIRCUIT_WAIT;
     if ((circ && connection_ap_handshake_attach_chosen_circuit(
                    conn, circ, cpath) < 0) ||
         (!circ &&
          connection_ap_handshake_attach_circuit(conn) < 0)) {
       if (!conn->_base.marked_for_close)
         connection_mark_unattached_ap(conn,
 END_STREAM_REASON_CANT_ATTACH);
       return -1;
     }
 }}}

 So at first glance, something keeps a new client stream from getting
 attached, and it gets marked twice.  The clear fix seems to be adding a
 check in connection_handle_listener read to avoid the double-mark more
 cleanly.  But there's a root problem here that doesn't seem to be visible
 from the original bug description: why is
 connection_ap_handshake_attach{_chosen}_circuit() failing in the first
 place?

 Kiyoo, do you have any other messages in your log that could be related to
 this?

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


More information about the tor-bugs mailing list