[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs