[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #15942 [Core Tor/Tor]: Make tor connection failures random-exponential-backoff
#15942: Make tor connection failures random-exponential-backoff
-------------------------------------------------+-------------------------
Reporter: teor | Owner: andrea
Type: defect | Status:
Priority: High | assigned
Component: Core Tor/Tor | Milestone: Tor:
Severity: Normal | 0.2.9.x-final
Keywords: SponsorS, 028-triage, tor-dos, | Version:
TorCoreTeam201606 | Resolution:
Parent ID: #17293 | Actual Points:
Reviewer: | Points: 3
| Sponsor:
| SponsorU-can
-------------------------------------------------+-------------------------
Comment (by andrea):
Failed directory connections are handled in
connection_dir_request_failed(),
which calls:
- networkstatus_consensus_download_failed() for a consensus
- calls download_status_failed() /
update_consensus_networkstatus_downloads()
- download_status_failed() is macro for
download_status_increment_failure()
- connection_dir_download_cert_failed() for a certificate
- calls authority_cert_dl_failed() / update_certificate_downloads()
- this ultimately uses download_status_t too just like the consensus
download;
see download_status_is_ready_by_sk_in_cl() and friends in
routerlist.c
- connection_dir_download_routerdesc_failed()
890 /* No need to relaunch descriptor downloads here: we already do it
891 * every 10 or 60 seconds (FOO_DESCRIPTOR_RETRY_INTERVAL) in
main.c. */
- The mechanism here is in
launch_descriptor_fetches_callback()/reset_descriptor_failures_callback();
we can realize exponential backoff by suitable adjustments
- connection_dir_bridge_routerdesc_failed()
- calls connection_dir_retry_bridges()
- calls retry_bridge_descriptor_fetch_directly()
- calls launch_direct_bridge_descriptor_fetch()
At minimum, it should be easy to implement exponential backoffs for
consensus and certificate downloads through the download_status_t
mechanism, since they already notify it of their successes/failures and
ask it whether we're ready to attempt a new download yet. Further
ivestigation of the right approach for the bridge descriptor and router
descriptor download cases pending.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15942#comment:14>
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