[tor-bugs] #28061 [Core Tor/sbws]: Check prioritisation, it should make 2 measurements that are 24 appart

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Oct 18 01:38:41 UTC 2018


#28061: Check prioritisation, it should make 2 measurements that are 24 appart
---------------------------+-------------------------------------
 Reporter:  juga           |          Owner:  (none)
     Type:  defect         |         Status:  new
 Priority:  Medium         |      Milestone:  sbws 1.0 (MVP nice)
Component:  Core Tor/sbws  |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:  #28042         |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+-------------------------------------

Comment (by teor):

 Replying to [comment:6 juga]:
 > Replying to [comment:4 teor]:
 > > I am very confused by these results. It seems strange to me that sbws
 can't make 2 measurements of a relay over a few days.
 >
 > It also seems weird to me, so that i've been debugging prioritization
 today, so far i didn't find the reason.

 Is there some documentation for relay priority?
 If we prioritise failed relays, then most of our circuits will fail. In
 some cases, we will overload relays that are already failing.

 > > Can you please tell us:
 > > * how long sbws has been running for?
 >
 > Forever :) Results dated older than 7 days ago are not took
 > Those results were done without the last recent day, but still.
 >
 > > * the number of relays measured each day:
 >
 > This is the number of results each day, not relays:
 >
 > 1555 2018-10-10.txt
 > 1485 2018-10-11.txt
 > 1363 2018-10-12.txt
 > 1574 2018-10-13.txt
 > 1665 2018-10-14.txt

 If it takes 5 days for sbws to measure 7000 relays, then maybe sbws should
 use results from the last 10 days.

 > 1707 2018-10-15.txt
 > 1819 2018-10-16.txt
 > 3332 2018-10-17.txt

 ...

 > > * the exact code that you are using to do the "2 measurements at least
 24 hours apart" test?
 >
 > https://gitweb.torproject.org/sbws.git/tree/sbws/lib/v3bwfile.py#n278

 Ok, so there is a bug in this code.

 The original task was:

 > If any of these things are true, do not put the relay in the bandwidth
 file:
 > * there are less than 2 sbws measured bandwidths
 > * all the sbws measured bandwidths are within 24 hours of each other

 But the code implements:

 1. If there are less than 2 results, do not put the relay in the bandwidth
 file
 2. If any result is within 24 hours of the previous result, remove it.
 Then, if there is only one result, do not put the relay in the bandwidth
 file.

 Here are some results and the outputs they should produce:
 0h produces None
 0h, 24h produces 0h, 24h
 0h, 1h, 24h produces 0h, 1h, 24h (but I think the current function
 produces 0h, 24h)
 0h, 24h, 36h produces 0h, 24h, 36h (but I think the current function
 produces 0h, 24h)

 Maybe these functions need some unit tests?

 > > * the exact measurement times for a relay that passes the test?
 >
 > Attachment

 I don't understand this attachment.
 It looks like a list of all the times that pass the test, with no relay
 ids.

 But I wanted to see a list of times for one relay that passes the test.

 > > * the exact measurement times for a relay with multiple measurements
 that fails the test?
 >
 > Attachment
 > All from today, hmm?

 Let's just focus on a single relay.

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


More information about the tor-bugs mailing list