[tor-bugs] #28870 [Core Tor/sbws]: Stop asserting when there's not a descriptor for a relay being measured
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Dec 17 07:48:56 UTC 2018
#28870: Stop asserting when there's not a descriptor for a relay being measured
-------------------------------+-------------------------------
Reporter: juga | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: sbws: 1.0.x-final
Component: Core Tor/sbws | Version: sbws: 1.0.2
Severity: Normal | Keywords:
Actual Points: | Parent ID: #28663
Points: | Reviewer:
Sponsor: |
-------------------------------+-------------------------------
When sbws doesn't have a descriptor for a relay that is being measured
(but it has a network status document, and possibly the other way around),
it raises and exception via this assert
(https://github.com/torproject/sbws/blob/ee64d76df54ceb3a3c9e1e2a797fd70d68bb0035/sbws/lib/relaylist.py#L45),
which causes the error callback in the thread pool in scanner.
Instead, it should just return None (what can also be done by getattr and
removes redundant code), and all the logic that depends on it will just
work fine, it just won't be choose as an exit, since there's no
information about the exit flags, but will get measured.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28870>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list