[tor-bugs] #11069 [Tor]: Tor with unreachable PTs should not hang the bootstrap process

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Mar 10 17:11:01 UTC 2014


#11069: Tor with unreachable PTs should not hang the bootstrap process
------------------------+------------------------------------------
     Reporter:  asn     |      Owner:
         Type:  defect  |     Status:  needs_review
     Priority:  normal  |  Milestone:  Tor: 0.2.5.x-final
    Component:  Tor     |    Version:
   Resolution:          |   Keywords:  tor-pt tor-client, tbb-needs
Actual Points:          |  Parent ID:
       Points:          |
------------------------+------------------------------------------

Comment (by asn):

 I moved the `connection_or_notify_error()` below
 `connection_mark_for_close_internal()` because I wanted the connection to
 be already closed when the new `any_active_orconns()` function gets
 called. Otherwise, `any_active_orconns()` would consider the current
 connection (that is about to be closed) as an active connection.

 We could avoid this problem by making `any_active_orconns()` smarter and
 passing it a connection as an argument and making it consider that
 connection as closed (maybe rename it to
 `any_other_active_orconns(or_connection_t *conn)`). I suggested this in
 comment:9 and nick was not very enthusiastic, which makes sense, since the
 solution is not elegant.

 Unfortunately, the rest of the solutions I can think of (that don't
 require big refactoring) are not very elegant either. Solutions involve
 restoring the previous order of the function but calling
 `control_event_bootstrap_problem()` after we've closed the connection. But
 this would call `control_event_bootstrap_problem()` twice, except if we
 modified the code so that it doesn't happen.

 Other solutions involve moding `connection_or_notify_error()`  to decouple
 `connection_or_connect_failed()` from `channel_close_for_error()`. But
 this would require too much modification in other parts of the code.

 Any other ideas?

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


More information about the tor-bugs mailing list