[tor-bugs] #28868 [Core Tor/sbws]: best_priority() can starve the worker threads of good relays

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jan 22 10:49:28 UTC 2019


#28868: best_priority() can starve the worker threads of good relays
---------------------------+-----------------------------------
 Reporter:  teor           |          Owner:  juga
     Type:  defect         |         Status:  needs_revision
 Priority:  Medium         |      Milestone:  sbws: 1.0.x-final
Component:  Core Tor/sbws  |        Version:  sbws: 1.0.2
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:  #28663         |         Points:
 Reviewer:  ahf            |        Sponsor:
---------------------------+-----------------------------------

Comment (by juga):

 Replying to [comment:6 teor]:
 > > > Here's a very simple algorithm that avoids starving good relays for
 failed relays:
 > > > 1. Count the number of times that sbws has attempted to get a result
 from each relay.
 > >
 > > This is already done when writing the results: ResultError and
 ResultSuccess keep that.
 >
 > But some failures do not write a ResultError.
 >
 > > > 2. Test the relays with the lowest number of attempts first. (Don't
 check if the attempt succeeded or failed.)
 > >
 > > This's what i was proposing by commenting the part where it
 prioritizes ResultError measurements.
 >
 > I don't understand what you mean here.
 > Can you link to the comment, or quote it?

 sorry, i don't remember now where i said that, but i think i
 missunderstand you.
 I think this adds more complexity but might help to get more `eligible`
 relays.
 What if we open a new ticket for that?

 > > >
 > > > For this priority rule to work, every time a relay is queued, it
 must get a result. Here's how we can make that happen"
 > > > * Modify `result_putter_error()` to store an error result to the
 queue.
 > >
 > > result_putter already writes ResultError.
 >
 > But result_putter_error() is called when there is an exception in
 apply_async(), and it does not write ResultError.

 Ah, i get you now, you're right.
 This might need some more changes.
 What if we also open a new ticket for this?.

 > You'll also need to update the documentation:
 >
 https://github.com/torproject/sbws/blob/master/docs/source/specification.rst
 #simple-relay-prioritization

 ok, updated

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


More information about the tor-bugs mailing list