[tor-bugs] #24668 [Core Tor/Tor]: sched: scheduler_compare_channels() function will never pick a channel with no active circuis.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Dec 19 21:00:14 UTC 2017
#24668: sched: scheduler_compare_channels() function will never pick a channel with
no active circuis.
----------------------------+----------------------------------------------
Reporter: dgoulet | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.3.3.x-final
Component: Core | Version:
Tor/Tor |
Severity: Normal | Keywords: tor-sched, tor-channel, tor-cell
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
----------------------------+----------------------------------------------
In the schedulers, scheduler_compare_channels() is used to decide which
channel is 'best' to write data from. It delegates to
circuitmux_compare_muxes(), which delegates to ewma_cmp_cmux().
But ewma_cmp_cmux() will never prefer a cmux with no active circuits on
it! So a channel without active circuits will never be picked by the
scheduler to flush from a circuit, which is what triggers flushing from
its destroy queue. So the channel will stay around forever, never
flushing.
To fix this one, we probably have to fix ewma_cmp_cmux() to look at
destroy cells too (somehow). And we still need to make sure that the
scheduler's position in the heap changes when the data considered by
scheduler_compare_channels() changes [*].
[*] I'm not convinced that we're even doing this right with the current
scheduler_compare_channels() code. :(
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24668>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list