Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-07 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
-+-
 Reporter:  teor |  Owner:
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:  fixed
 Keywords:  regression, CoreTorTeam201611,   |  Actual Points:  0.2
  029-proposed   |
Parent ID:  #20499   | Points:  1
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 So this is done.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-07 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
-+-
 Reporter:  teor |  Owner:
 Type:  defect   | Status:
 |  reopened
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  regression, CoreTorTeam201611,   |  Actual Points:  0.2
  029-proposed   |
Parent ID:  #20499   | Points:  1
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Hmm, actually, for consistency with update_networkstatus_downloads, we
 can't wait any longer than valid_until. Otherwise we would start
 downloading a new consensus while waiting for certificates on the old one.

 {{{
 if (! (c && c->valid_after <= now && now <= c->valid_until)) {
   /* No live consensus? Get one now!*/
   time_to_download_next_consensus[i] = now;
 }
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-07 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
-+-
 Reporter:  teor |  Owner:
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:  fixed
 Keywords:  regression, CoreTorTeam201611,   |  Actual Points:  0.2
  029-proposed   |
Parent ID:  #20499   | Points:  1
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * status:  needs_review => closed
 * resolution:   => fixed


Comment:

 > OLD_ROUTER_DESC_MAX_AGE (5 days) seems excessive, maybe
 REASONABLY_LIVE_TIME?

 Sure, that would be okay.

 Merging your patch above.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-07 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
-+-
 Reporter:  teor |  Owner:
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  regression, CoreTorTeam201611,   |  Actual Points:  0.2
  029-proposed   |
Parent ID:  #20499   | Points:  1
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * status:  new => needs_review


Comment:

 Replying to [comment:6 teor]:
 > ...
 > * fail a consensus if it expires while we are waiting for certificates
 for it

 Hmm, should we allow some leeway here? Particularly if the client clock is
 off?

 OLD_ROUTER_DESC_MAX_AGE (5 days) seems excessive, maybe
 REASONABLY_LIVE_TIME?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-07 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
-+-
 Reporter:  teor |  Owner:
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.2.9.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  unspecified
 Severity:  Normal   | Resolution:
 Keywords:  regression, CoreTorTeam201611,   |  Actual Points:  0.2
  029-proposed   |
Parent ID:  #20499   | Points:  1
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * keywords:  regression => regression, CoreTorTeam201611, 029-proposed
 * version:   => Tor: unspecified
 * actualpoints:   => 0.2


Comment:

 Please see my github branch bug20533_029 for a fix for this issue.

 It does two things:
 * fail a consensus if it expires while we are waiting for certificates for
 it
 * only count a certificate download failure as a consensus schedule
 failure if we actually had a chance to download certificates (currently 1
 minute after requesting certificates)

 The risk in this patch is that we keep trying for certificates, but this
 is unlikely, given that we still stop waiting for certificates for the
 consensus.

 Fix on commit e0204f21 in 0.2.0.9-alpha.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-07 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
--+
 Reporter:  teor  |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  regression|  Actual Points:
Parent ID:  #20499| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by teor):

 Hmm, I'm still thinking about this:

 If the consensus was current when we received it, but has expired before
 we received all the certificates, and it's less than
 DELAY_WHILE_FETCHING_CERTS since we received it, then I'm not sure if we
 should still call download_status_failed(). Otherwise, a mirror (one of
 our directory guards, or our bridge) could feed us a series of almost-
 stale consensuses, and cause us increment our failure count exponentially.
 But this only works if we ask for consensuses within 20 minutes of the
 hour, or if our receipt of the full consensus can be delayed using a slow-
 delivery attack.

 If we fail because the consensus is not modified, we shouldn't even get
 this far, we should instead wait before calling
 update_consensus_networkstatus_downloads().

 And if the mirror feeds us a consensus that has already expired, we should
 call the mirror bad, ignore the consensus, and try another one.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-07 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
--+
 Reporter:  teor  |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  regression|  Actual Points:
Parent ID:  #20499| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by teor):

 Replying to [comment:3 nickm]:
 > I am trying to understand what you're saying in the description above.
 What causes the second call to download_status_increment_failure() ?  Does
 this have something to do with parallel requests?

 Not really.

 If check_consensus_waiting_for_certs is called when we've been waiting
 longer than DELAY_WHILE_FETCHING_CERTS, it calls
 `download_status_failed(dls, 0);`.

 This is the source of the second failure, and in most cases it should be
 counted as a failure - we successfully downloaded a consensus, but could
 not download enough certificates to validate it.

 That said, we should probably fail `check_consensus_waiting_for_certs` if
 the consensus we're waiting for has expired, too. But this could wait for
 0.3.0.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-06 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
--+
 Reporter:  teor  |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  regression|  Actual Points:
Parent ID:  #20499| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by nickm):

 I am trying to understand what you're saying in the description above.
 What causes the second call to download_status_increment_failure() ?  Does
 this have something to do with parallel requests?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-02 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
--+
 Reporter:  teor  |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  regression|  Actual Points:
Parent ID:  #20499| Points:  1
 Reviewer:|Sponsor:
--+

Comment (by teor):

 This also affects #19969

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-02 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
--+
 Reporter:  teor  |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  regression|  Actual Points:
Parent ID:  #20499| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * parent:   => #20499


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

[tor-bugs] #20533 [Core Tor/Tor]: Each download request should only increment the failure count once

2016-11-02 Thread Tor Bug Tracker & Wiki
#20533: Each download request should only increment the failure count once
--+
 Reporter:  teor  |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor  |Version:
 Severity:  Normal|   Keywords:  regression
Actual Points:|  Parent ID:
   Points:  1 |   Reviewer:
  Sponsor:|
--+
 From #20499:

 At startup (or reload) the relay fetches the microdesc consensus

 1 minute later it tries to fetch it again
 (update_consensus_networkstatus_downloads() is called) and receives a 304
 response as it hasn't been modified

 download_status_increment_failure() gets called with a status_code of 304

 update_consensus_networkstatus_downloads() gets called again, this time it
 stops at the call to connection_dir_count_by_purpose_and_resource() which
 returns 1 (equal to max_in_progress_conns)

 download_status_increment_failure() gets called again, this time with a
 status_code of 0 (as a result each 304 response results in the fail count
 being increased by 2)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs