Opened 5 years ago

Closed 5 years ago

#13389 closed defect (fixed)

If no authorities votes on a BadExit flag, doctor crashes

Reported by: tom Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/DocTor Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Parse consensuses without any BadExit votes. Doctor crashes with the following error

Traceback (most recent call last):
  File "./", line 744, in <module>
  File "./", line 243, in main
    issues += run_checks(consensuses, votes)
  File "./", line 325, in run_checks
    issues = checker(latest_consensus, consensuses, votes)
  File "./", line 649, in bad_exits_in_sync
    agreed_bad_exits = set.intersection(*bad_exits.values())
TypeError: descriptor 'intersection' of 'set' object needs an argument

Child Tickets

Change History (2)

comment:1 Changed 5 years ago by tom

Fixing this may be as simple as

@@ -609,6 +646,8 @@ def bad_exits_in_sync(latest_consensus, consensuses, votes):
       bad_exits[authority] = set(flagged)

   voting_authorities = set(bad_exits.keys())
+  if not voting_authorities:
+    return
   agreed_bad_exits = set.intersection(*bad_exits.values())
   disagreed_bad_exits = set.union(*bad_exits.values()).difference(agreed_bad_exits)

comment:2 Changed 5 years ago by atagar

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.